21427 {
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26755 {
26757 }
26759 {
26760 if (Main.windPhysics)
26761 {
26762 velocity.X += Main.windSpeedCurrent * Main.windPhysicsStrength;
26763 }
26764 if (
type == 93 && Main.rand.Next(5) == 0)
26765 {
26767 Main.dust[
num].noGravity =
true;
26768 Main.dust[
num].fadeIn = 1
f;
26769 Main.dust[
num].velocity.X *= 0.3f;
26770 Main.dust[
num].velocity.Y *= 0.3f;
26771 }
26773 {
26775 {
26779 Vector2
vector90 = base.Center +
new Vector2(-8
f, -8
f) +
velocity.SafeNormalize(Vector2.Zero) * 25
f;
26780 for (int i = 0; i < 8; i++)
26781 {
26782 Dust dust = Main.dust[Dust.NewDust(
vector90, 16, 16, 31,
velocity.X,
velocity.Y, 50,
default(Color), 0.75f + Main.rand.NextFloat() * 0.3f)];
26783 dust.velocity = (
velocity * (0.2f +
num185)).RotatedByRandom(0.699999988079071) +
vector * 0.25f;
26786 dust212.velocity *= 0
f + Main.rand.NextFloat() * 1
f;
26787 dust.fadeIn = 0.1f;
26790 dust212.position -= dust.velocity;
26791 dust.noGravity = true;
26792 }
26793 }
26796 }
26798 {
26801 }
26803 {
26805 }
26806 else
26807 {
26809 }
26811 {
26814 if (this.
ai[0] >= (
float)num299)
26815 {
26816 velocity.Y += 0.4f;
26817 velocity.X *= 0.97f;
26818 }
26819 if (Main.netMode != 1 &&
this.ai[1] == 0
f)
26820 {
26821 this.
ai[1] = 1 + Main.rand.Next(6);
26823 }
26824 if (this.
ai[1] > 0
f)
26825 {
26827 }
26828 }
26829 else if (
type == 162)
26830 {
26831 if (this.
ai[1] == 0
f)
26832 {
26835 }
26837 if (this.
ai[0] >= 18
f)
26838 {
26839 velocity.Y += 0.28f;
26840 velocity.X *= 0.99f;
26841 }
26842 if (this.
ai[0] > 2
f)
26843 {
26845 if (this.
ai[0] == 3
f)
26846 {
26847 for (
int j = 0;
j < 10;
j++)
26848 {
26852 dust212.velocity *= 0.5f;
26855 dust212.velocity +=
velocity * 0.1f;
26856 }
26857 for (
int k = 0;
k < 5;
k++)
26858 {
26860 Main.dust[
num521].noGravity =
true;
26863 dust212.velocity *= 3
f;
26866 dust212.velocity +=
velocity * 0.2f;
26870 dust212.velocity *= 2
f;
26873 dust212.velocity +=
velocity * 0.3f;
26874 }
26875 for (
int l = 0;
l < 1;
l++)
26876 {
26877 Vector2
val3 =
new Vector2(
base.position.X - 10
f,
base.position.Y - 10
f);
26878 val4 =
default(Vector2);
26880 Gore gore = Main.gore[
num632];
26882 gore8.position +=
velocity * 1.25f;
26883 Main.gore[
num632].scale = 1.5f;
26884 gore = Main.gore[
num632];
26886 gore8.velocity +=
velocity * 0.5f;
26887 gore = Main.gore[
num632];
26889 gore8.velocity *= 0.02f;
26890 }
26891 }
26892 }
26893 }
26894 else if (
type == 281)
26895 {
26896 if (this.
ai[1] == 0f)
26897 {
26900 }
26902 if (this.
ai[0] >= 18f)
26903 {
26904 velocity.Y += 0.28f;
26905 velocity.X *= 0.99f;
26906 }
26907 if (this.
ai[0] > 2f)
26908 {
26910 if (this.
ai[0] == 3f)
26911 {
26912 for (
int m = 0;
m < 10;
m++)
26913 {
26917 dust212.velocity *= 0.5f;
26920 dust212.velocity +=
velocity * 0.1f;
26921 }
26922 for (
int n = 0;
n < 5;
n++)
26923 {
26925 Main.dust[
num854].noGravity =
true;
26928 dust212.velocity *= 3
f;
26931 dust212.velocity +=
velocity * 0.2f;
26935 dust212.velocity *= 2
f;
26938 dust212.velocity +=
velocity * 0.3f;
26939 }
26941 {
26942 Vector2
val5 =
new Vector2(
base.position.X - 10
f,
base.position.Y - 10
f);
26943 val4 =
default(Vector2);
26944 int num2 = Gore.NewGore(
val5,
val4, Main.rand.Next(61, 64));
26947 gore8.position +=
velocity * 1.25f;
26948 Main.gore[
num2].scale = 1.5f;
26951 gore8.velocity +=
velocity * 0.5f;
26954 gore8.velocity *= 0.02f;
26955 }
26956 }
26957 }
26958 }
26959 else if (
type == 240)
26960 {
26961 if (this.
ai[1] == 0f)
26962 {
26965 }
26967 if (this.
ai[0] >= 16f)
26968 {
26969 velocity.Y += 0.18f;
26970 velocity.X *= 0.991f;
26971 }
26972 if (this.
ai[0] > 2f)
26973 {
26975 if (this.
ai[0] == 3f)
26976 {
26978 {
26979 int num97 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 31, 0
f, 0
f, 100,
default(Color), 1.5f);
26982 dust212.velocity *= 0.5f;
26985 dust212.velocity +=
velocity * 0.1f;
26986 }
26988 {
26990 Main.dust[
num119].noGravity =
true;
26993 dust212.velocity *= 3
f;
26996 dust212.velocity +=
velocity * 0.2f;
27000 dust212.velocity *= 2
f;
27003 dust212.velocity +=
velocity * 0.3f;
27004 }
27006 {
27007 Vector2
val6 =
new Vector2(
base.position.X - 10
f,
base.position.Y - 10
f);
27008 val4 =
default(Vector2);
27012 gore8.position +=
velocity * 1.25f;
27013 Main.gore[
num141].scale = 1.25f;
27016 gore8.velocity +=
velocity * 0.5f;
27019 gore8.velocity *= 0.02f;
27020 }
27021 }
27022 }
27023 }
27024 else if (
type == 497)
27025 {
27028 Main.dust[
num152].noGravity =
true;
27031 dust212.velocity *= 0.3f;
27034 dust212.velocity -=
velocity * 0.1f;
27036 if (this.
ai[0] >= 30f)
27037 {
27038 velocity.X *= 0.99f;
27039 velocity.Y += 0.5f;
27040 }
27041 else
27042 {
27044 }
27045 }
27046 else if (
type == 861)
27047 {
27048 if (Main.myPlayer ==
owner)
27049 {
27052 {
27054 }
27057 {
27060 {
27062 break;
27063 }
27064 }
27065 }
27067 {
27068 velocity.X *= 0.95f;
27069 }
27070 else
27071 {
27072 velocity.X *= 0.995f;
27073 }
27075 {
27077 }
27079 {
27081 }
27082 velocity.Y += 0.1f;
27083 if (this.
ai[1] == 1f)
27084 {
27087 }
27088 else
27089 {
27091 {
27093 }
27096 {
27100 {
27102 }
27103 }
27107 {
27109 }
27110 }
27111 }
27112 else if (
type == 249)
27113 {
27115 if (this.
ai[0] >= 0f)
27116 {
27117 velocity.Y += 0.25f;
27118 }
27119 }
27120 else if (
type == 347)
27121 {
27123 if (this.
ai[0] >= 5f)
27124 {
27125 velocity.Y += 0.25f;
27126 }
27127 }
27128 else if (
type == 501)
27129 {
27131 if (this.
ai[0] >= 18f)
27132 {
27133 velocity.X *= 0.995f;
27134 velocity.Y += 0.2f;
27135 }
27136 }
27138 {
27141 if (this.
ai[0] > 3f)
27142 {
27144 if (this.
ai[0] > 20f)
27145 {
27150 {
27152 }
27153 }
27154 if (this.
ai[0] <= 10f)
27155 {
27157 }
27158 if (Main.rand.Next(100) <
num174)
27159 {
27160 int num208 = ((
type != 979) ? Dust.NewDust(
base.position,
width,
height, 6, 0
f, 0
f, 150) : Dust.NewDust(
base.position,
width,
height, 135, 0
f, 0
f, 150));
27162 Main.dust[
num208].noGravity =
true;
27165 dust212.velocity *= 2
f;
27168 dust212.scale *= 1.6f;
27172 }
27173 }
27174 if (this.
ai[0] >= 20f)
27175 {
27176 velocity.X *= 0.99f;
27177 velocity.Y += 0.1f;
27178 }
27179 }
27181 {
27183 if (this.
ai[0] >= 10f)
27184 {
27185 velocity.Y += 0.25f;
27186 velocity.X *= 0.99f;
27187 }
27188 }
27189 else if (
type == 166)
27190 {
27191 if (
owner == Main.myPlayer &&
this.ai[1] == 1
f)
27192 {
27194 {
27196 {
27198 return;
27199 }
27200 }
27201 if (Main.netMode == 1)
27202 {
27204 {
27206 {
27208 return;
27209 }
27210 }
27211 }
27212 }
27214 if (this.
ai[0] >= 20f)
27215 {
27216 velocity.Y += 0.3f;
27217 velocity.X *= 0.98f;
27218 }
27219 }
27220 else if (
type == 300)
27221 {
27222 if (this.
ai[0] == 0f)
27223 {
27225 }
27227 if (this.
ai[0] >= 60f)
27228 {
27229 velocity.Y += 0.2f;
27230 velocity.X *= 0.99f;
27231 }
27232 }
27233 else if (
type == 306)
27234 {
27236 {
27238 {
27242 Main.dust[
num277].position.X = base.Center.X -
num255;
27243 Main.dust[
num277].position.Y = base.Center.Y -
num266;
27246 dust212.velocity *= 0
f;
27247 Main.dust[
num277].scale = 0.7f;
27248 }
27249 }
27252 {
27254 }
27256 }
27257 else if (
type == 304)
27258 {
27260 if (this.
ai[0] >= 30f)
27261 {
27266 {
27268 }
27269 }
27270 if (this.
ai[0] < 30f)
27271 {
27273 }
27274 }
27276 {
27278 if (this.
ai[0] >= 15f)
27279 {
27280 velocity.Y += 0.3f;
27281 velocity.X *= 0.98f;
27282 }
27283 }
27284 else
27285 {
27288 {
27289 num288 = 28 + Main.rand.Next(6);
27290 }
27292 if (this.
ai[0] >= (
float)num288)
27293 {
27295 {
27297 }
27298 velocity.Y += 0.4f;
27299 velocity.X *= 0.97f;
27300 }
27302 {
27304 }
27305 }
27307 {
27309 }
27310 if (
type == 54 && Main.rand.Next(20) == 0)
27311 {
27312 Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 40, velocity.X * 0.1f, velocity.Y * 0.1f, 0,
default(Color), 0.75f);
27313 }
27314 }
27316 {
27318 {
27321 }
27323 {
27325 {
27326 int num311 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 6, velocity.X * 0.2f, velocity.Y * 0.2f, 100,
default(Color), 2
f);
27327 Main.dust[
num311].noGravity =
true;
27328 Main.dust[
num311].velocity.X *= 0.3f;
27329 Main.dust[
num311].velocity.Y *= 0.3f;
27330 }
27331 }
27332 else if (
type == 1000)
27333 {
27334 if (Main.rand.Next(3) == 0)
27335 {
27336 switch (Main.rand.Next(3))
27337 {
27338 default:
27339 {
27340 int num1076 = Main.rand.Next(3);
27342 {
27343 1 => 57,
27344 2 => 58,
27346 }, velocity.X * 0.25f, velocity.Y * 0.25f, 150, default(Color), 0.7f)];
27349 dust212.velocity *= 0.5f;
27350 break;
27351 }
27352 case 1:
27353 {
27354 Dust
dust172 = Main.dust[Dust.NewDust(
base.position,
width,
height, 267,
velocity.X,
velocity.Y, 50,
new Color(50, 50, 200), 1.1f)];
27355 dust172.fadeIn = 0.1f;
27356 dust172.velocity =
velocity * 0.5f;
27357 dust172.noGravity = true;
27358 break;
27359 }
27360 case 2:
27361 {
27363 dust171.noGravity = true;
27365 break;
27366 }
27367 }
27368 }
27369 }
27370 else if (
type == 867)
27371 {
27372 if (Main.rand.Next(3) == 0)
27373 {
27377 dust212.velocity *= 0.5f;
27378 Main.dust[
num332].noGravity =
true;
27379 }
27380 }
27381 else if (
type == 33)
27382 {
27383 if (Main.rand.Next(1) == 0)
27384 {
27386 Main.dust[
num343].noGravity =
true;
27387 }
27388 }
27389 else if (
type == 320)
27390 {
27391 if (Main.rand.Next(3) == 0)
27392 {
27394 if (Main.rand.Next(2) == 0)
27395 {
27396 Main.dust[
num354].scale = 0.9f;
27399 dust212.velocity *= 0.2f;
27400 }
27401 else
27402 {
27403 Main.dust[
num354].noGravity =
true;
27404 }
27405 }
27406 }
27407 else if (
type == 6)
27408 {
27409 if (Main.rand.Next(5) == 0)
27410 {
27411 int num1077 = Main.rand.Next(3);
27413 {
27414 0 => 15,
27415 1 => 57,
27417 }, velocity.X * 0.25f, velocity.Y * 0.25f, 150, default(Color), 0.7f);
27418 }
27419 }
27420 else if (
type == 113 && Main.rand.Next(1) == 0)
27421 {
27423 Main.dust[
num375].noGravity =
true;
27425 }
27426 if (this.
ai[0] == 0f)
27427 {
27431 {
27433 }
27435 {
27437 }
27438 if (
type == 106 && this.
ai[1] >= 45f)
27439 {
27443 }
27445 {
27446 if (this.
ai[1] >= 10f)
27447 {
27448 velocity.Y += 0.5f;
27450 {
27451 velocity.Y += 0.35f;
27452 }
27453 velocity.X *= 0.95f;
27455 {
27457 }
27458 if (
type == 383 && Vector2.Distance(
base.Center, Main.player[
owner].Center) > 800
f)
27459 {
27462 }
27463 }
27464 }
27465 else if (
type == 182)
27466 {
27467 if (Main.rand.Next(2) == 0)
27468 {
27472 dust212.velocity *= 0.1f;
27473 Main.dust[
num399].noGravity =
true;
27474 }
27476 {
27478 }
27480 {
27482 }
27487 if (this.
ai[1] > 10f && this.
ai[1] < 360f)
27488 {
27490 {
27491 if (Main.npc[
num444].CanBeChasedBy(
this))
27492 {
27497 {
27502 }
27503 }
27504 }
27505 }
27507 {
27508 num411 = base.position.X + (float)(
width / 2) + velocity.X * 100
f;
27509 num422 = base.position.Y + (float)(
height / 2) + velocity.Y * 100
f;
27510 if (this.
ai[1] >= 30f)
27511 {
27515 }
27516 }
27529 {
27532 {
27534 }
27535 }
27537 {
27540 {
27542 }
27543 }
27545 {
27548 {
27550 }
27551 }
27553 {
27556 {
27558 }
27559 }
27560 }
27561 else if (
type == 866)
27562 {
27564 {
27567 {
27569 this.
ai[1] = num566;
27570 }
27571 else
27572 {
27574 }
27575 if (this.
ai[1] != num555)
27576 {
27578 }
27579 }
27583 if (Main.npc.IndexInRange(
num577) && Main.npc[
num577].CanBeChasedBy(
this))
27584 {
27586 }
27587 else
27588 {
27591 if (
owner != Main.myPlayer)
27592 {
27594 }
27596 {
27600 }
27601 }
27614 {
27617 {
27619 }
27620 }
27622 {
27625 {
27627 }
27628 }
27630 {
27633 {
27635 }
27636 }
27638 {
27641 {
27643 }
27644 }
27645 }
27646 else if (
type == 301)
27647 {
27648 if (this.
ai[1] >= 20f)
27649 {
27654 }
27655 }
27656 else if (this.
ai[1] >= 30f)
27657 {
27661 }
27662 }
27663 else
27664 {
27669 {
27671 }
27673 {
27676 }
27677 else if (
type == 33)
27678 {
27681 }
27682 else if (
type == 182)
27683 {
27686 }
27687 else if (
type == 866)
27688 {
27691 }
27692 else if (
type == 106)
27693 {
27696 }
27697 else if (
type == 272)
27698 {
27701 }
27702 else if (
type == 333)
27703 {
27706 }
27707 else if (
type == 301)
27708 {
27711 }
27712 else if (
type == 320)
27713 {
27716 }
27717 else if (
type == 383)
27718 {
27721 }
27728 {
27730 }
27735 {
27738 {
27742 }
27743 }
27744 else
27745 {
27747 {
27750 {
27752 }
27753 }
27755 {
27758 {
27760 }
27761 }
27763 {
27766 {
27768 }
27769 }
27771 {
27774 {
27776 }
27777 }
27778 }
27779 if (Main.myPlayer ==
owner)
27780 {
27781 Rectangle
rectangle =
default(Rectangle);
27783 Rectangle value = default(Rectangle);
27784 ((Rectangle)(
ref value)).
_002Ector((
int)Main.player[
owner].position.X, (int)Main.player[
owner].position.Y, Main.player[
owner].width, Main.player[
owner].height);
27786 {
27788 }
27789 }
27790 }
27792 {
27794 }
27795 else if (
type == 866)
27796 {
27798 if (Main.rand.Next(2) == 0)
27799 {
27803 dust212.velocity *= 0.1f;
27804 Main.dust[
num721].noGravity =
true;
27805 }
27806 }
27807 else if (
type == 383)
27808 {
27809 if (this.
ai[0] == 0f)
27810 {
27812 v = v.SafeNormalize(Vector2.Zero);
27814 }
27815 else
27816 {
27817 Vector2
v2 = base.Center - Main.player[
owner].Center;
27818 v2 =
v2.SafeNormalize(Vector2.Zero);
27820 }
27821 }
27822 else if (
type == 301)
27823 {
27824 if (this.
ai[0] == 0f)
27825 {
27827 if (Main.rand.Next(2) == 0)
27828 {
27832 dust212.velocity +=
velocity * 0.3f;
27835 dust212.velocity *= 0.2f;
27836 Main.dust[
num732].noGravity =
true;
27837 }
27838 if (Main.rand.Next(3) == 0)
27839 {
27843 dust212.velocity +=
velocity * 0.5f;
27846 dust212.velocity *= 0.5f;
27847 Main.dust[
num744].noGravity =
true;
27848 }
27849 }
27850 else
27851 {
27853 }
27854 }
27855 else
27856 {
27858 }
27859 }
27861 {
27862 if (Main.netMode != 2 &&
this.ai[1] == 0
f &&
localAI[0] == 0
f)
27863 {
27867 {
27869 }
27871 }
27873 if (this.
ai[0] == 0f)
27874 {
27875 if (
type >= 150 &&
type <= 152 && this.
ai[1] == 0f &&
alpha == 255 && Main.rand.Next(2) == 0)
27876 {
27879 }
27882 {
27884 }
27885 else if (
type == 493 ||
type == 494)
27886 {
27888 }
27890 {
27891 return;
27892 }
27895 if (this.
ai[1] == 0f)
27896 {
27899 }
27900 if (
type == 7 && Main.myPlayer ==
owner)
27901 {
27903 if (this.
ai[1] >= 6f)
27904 {
27906 }
27909 Main.projectile[
num766].ai[1] = this.
ai[1] + 1f;
27910 NetMessage.SendData(27, -1, -1,
null,
num766);
27911 }
27912 else if (
type == 494 && Main.myPlayer ==
owner)
27913 {
27915 if (this.
ai[1] >= (
float)(7 + Main.rand.Next(2)))
27916 {
27918 }
27922 {
27925 }
27926 int number =
NewProjectile(
GetProjectileSource_FromThis(),
base.position.X +
velocity.X + (
float)(
width / 2),
base.position.Y +
velocity.Y + (
float)(
height / 2),
velocity.X,
velocity.Y,
num777,
num788,
num799,
owner, 0
f,
this.ai[1] + 1
f);
27927 NetMessage.SendData(27, -1, -1,
null,
number);
27928 }
27929 else if ((
type == 150 ||
type == 151) && Main.myPlayer ==
owner)
27930 {
27933 {
27935 }
27936 else if (
type == 151)
27937 {
27939 }
27940 if (this.
ai[1] >= 10f &&
type == 151)
27941 {
27943 }
27946 Main.projectile[
num821].ai[1] = this.
ai[1] + 1f;
27947 NetMessage.SendData(27, -1, -1,
null,
num821);
27948 }
27949 return;
27950 }
27952 {
27954 {
27956 {
27958 Main.dust[
num843].noGravity =
true;
27961 dust212.velocity *= 0.5f;
27962 }
27963 }
27964 else if (
type == 493 ||
type == 494)
27965 {
27967 {
27969 Main.dust[
num866].noGravity =
true;
27972 dust212.velocity *= 0.5f;
27973 }
27974 }
27975 else
27976 {
27978 {
27980 }
27981 Dust.NewDust(
base.position,
width,
height, 14, 0
f, 0
f, 170,
default(Color), 1.1f);
27982 }
27983 }
27985 {
27987 }
27988 else if (
type == 493 ||
type == 494)
27989 {
27991 }
27992 else
27993 {
27995 }
27997 {
27999 }
28000 }
28002 {
28003 if (!Main.remixWorld &&
type == 12 && Main.dayTime &&
damage == 1000)
28004 {
28006 }
28008 {
28009 if (
base.Center.Y >
this.ai[1])
28010 {
28012 }
28013 }
28014 else if (
type == 92)
28015 {
28016 if (
base.position.Y >
this.ai[1])
28017 {
28019 }
28020 }
28021 else if (
type == 9)
28022 {
28024 }
28025 else
28026 {
28027 if (this.
ai[1] == 0f && !Collision.SolidCollision(
base.position,
width,
height))
28028 {
28031 }
28032 if (this.
ai[1] != 0f)
28033 {
28035 }
28036 }
28038 {
28041 }
28043 {
28046 if (
base.Center.Y >=
this.ai[1])
28047 {
28049 }
28051 {
28053 }
28055 }
28057 {
28060 if (
base.Center.Y >=
this.ai[1])
28061 {
28063 }
28065 {
28067 }
28069 }
28070 else
28071 {
28073 {
28075 }
28078 {
28081 }
28083 {
28086 }
28087 }
28089 {
28091 }
28092 else
28093 {
28095 }
28097 {
28098 if (Main.rand.Next(16) == 0)
28099 {
28100 Vector2
spinningpoint18 = Vector2.UnitX.RotatedByRandom(1.5707963705062866);
28102 val4 =
default(Vector2);
28107 }
28108 if (Main.rand.Next(48) == 0)
28109 {
28113 gore8.velocity *= 0.66f;
28116 gore8.velocity +=
velocity * 0.3f;
28117 }
28118 }
28120 {
28121 Vector2
vector2 =
default(Vector2);
28124 if (((Rectangle)(
ref hitbox)).Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector2 / 2
f,
vector2 +
new Vector2(400
f))) && Main.rand.Next(6) == 0)
28125 {
28126 int num932 = Utils.SelectRandom<
int>(Main.rand, 16, 17, 17, 17);
28127 if (Main.tenthAnniversaryWorld)
28128 {
28129 num932 = Utils.SelectRandom<
int>(Main.rand, 16, 16, 16, 17);
28130 }
28132 }
28134 if (Main.rand.Next(20) == 0 || (Main.tenthAnniversaryWorld && Main.rand.Next(15) == 0))
28135 {
28137 }
28138 }
28140 {
28142 {
28143 Vector2
vector13 =
default(Vector2);
28146 if (((Rectangle)(
ref hitbox)).Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector13 / 2
f,
vector13 +
new Vector2(400
f))) && Main.rand.Next(24) == 0)
28147 {
28148 Gore.NewGore(
base.position,
velocity * 0.2f, Utils.SelectRandom<
int>(Main.rand, 16, 17));
28149 }
28150 if (Main.rand.Next(3) == 0)
28151 {
28155 dust212.velocity *= 0.5f;
28156 dust183.noGravity = true;
28157 }
28158 }
28160 {
28161 Vector2
vector24 =
default(Vector2);
28164 if (((Rectangle)(
ref hitbox)).Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector24 / 2
f,
vector24 +
new Vector2(400
f))) && Main.rand.Next(6) == 0)
28165 {
28167 }
28169 {
28173 val4 =
default(Vector2);
28176 dust194.noLight = true;
28177 dust194.noGravity = true;
28179 dust194.noLight = true;
28180 dust194.noGravity = true;
28181 }
28182 }
28183 }
28184 else if (
type == 9)
28185 {
28186 Vector2
vector46 =
default(Vector2);
28189 if (((Rectangle)(
ref hitbox)).Intersects(Utils.CenteredRectangle(Main.screenPosition +
vector46 / 2
f,
vector46 +
new Vector2(400
f))) && Main.rand.Next(20) == 0)
28190 {
28191 Gore.NewGore(
base.position,
velocity * 0.2f, Main.rand.Next(16, 18));
28192 }
28193 if (Main.rand.Next(4) == 0)
28194 {
28198 dust212.velocity *= 0.7f;
28199 dust205.noGravity = true;
28202 dust212.velocity +=
velocity * 0.3f;
28203 if (Main.rand.Next(2) == 0)
28204 {
28208 }
28209 }
28210 }
28211 else if (this.
ai[1] == 1f ||
type == 92)
28212 {
28214 if (Main.rand.Next(10) == 0)
28215 {
28217 }
28218 if (Main.rand.Next(20) == 0)
28219 {
28220 Gore.NewGore(
base.position,
new Vector2(
velocity.X * 0.2f,
velocity.Y * 0.2f), Main.rand.Next(16, 18));
28221 }
28222 }
28223 }
28225 {
28229 if (this.
ai[0] == 180f)
28230 {
28232 }
28233 if (this.
ai[1] == 0f)
28234 {
28239 {
28241 }
28243 {
28246 }
28248 {
28251 {
28252 dust209.noGravity =
num977 % 3 != 0;
28254 {
28257 dust212.scale *= 1.25f;
28260 dust212.velocity /= 2
f;
28261 dust209.velocity.Y -= 2.2f;
28262 }
28263 else
28264 {
28267 dust212.scale *= 1.75f;
28270 dust212.velocity +=
velocity * 0.65f;
28271 }
28272 }
28273 }
28274 }
28277 {
28278 flag34 = Main.netMode != 1;
28279 }
28281 {
28287 {
28289 }
28290 if (
num999 > Main.maxTilesX)
28291 {
28292 num999 = Main.maxTilesX;
28293 }
28295 {
28297 }
28298 if (
num1021 > Main.maxTilesY)
28299 {
28301 }
28302 Vector2
vector57 =
default(Vector2);
28304 {
28306 {
28310 {
28311 continue;
28312 }
28314 {
28316 {
28319 if (Main.netMode == 1)
28320 {
28322 }
28323 }
28325 {
28328 if (Main.netMode == 1)
28329 {
28331 }
28332 }
28334 {
28337 if (Main.netMode == 1)
28338 {
28340 }
28341 }
28343 {
28346 if (Main.netMode == 1)
28347 {
28349 }
28350 }
28352 {
28355 if (Main.netMode == 1)
28356 {
28358 }
28359 }
28361 {
28364 if (Main.netMode == 1)
28365 {
28367 }
28368 }
28370 {
28373 if (Main.netMode == 1)
28374 {
28376 }
28377 }
28378 }
28380 {
28382 {
28384 }
28386 {
28388 }
28389 }
28391 {
28392 continue;
28393 }
28396 {
28397 if (Main.remixWorld &&
num1043 >= (
int)Main.worldSurface - 1 &&
num1043 < Main.maxTilesY - 20)
28398 {
28400 }
28402 }
28403 }
28404 }
28405 }
28407 {
28409 }
28410 }
28412 {
28414 }
28416 {
28418 {
28421 }
28423 {
28426 }
28428 {
28430 {
28435 Main.dust[
num25].noGravity =
true;
28438 dust212.velocity *= 0.1f;
28441 dust212.velocity +=
velocity * 0.1f;
28444 }
28445 if (Main.rand.Next(5) == 0)
28446 {
28451 dust212.velocity *= 0.25f;
28454 dust212.velocity +=
velocity * 0.5f;
28455 }
28456 }
28457 else if (
type == 502)
28458 {
28459 float num58 = (float)Main.DiscoR / 255
f;
28460 float num69 = (float)Main.DiscoG / 255
f;
28461 float num80 = (float)Main.DiscoB / 255
f;
28466 }
28467 else if (
type == 95 ||
type == 96)
28468 {
28470 Main.dust[
num84].noGravity =
true;
28471 }
28472 else if (
type == 253)
28473 {
28475 {
28476 int num87 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 135, velocity.X * 0.2f, velocity.Y * 0.2f, 100,
default(Color), 2
f);
28477 Main.dust[
num87].noGravity =
true;
28478 Main.dust[
num87].velocity.X *= 0.3f;
28479 Main.dust[
num87].velocity.Y *= 0.3f;
28480 }
28481 }
28482 else
28483 {
28485 {
28486 int num89 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 6, velocity.X * 0.2f, velocity.Y * 0.2f, 100,
default(Color), 2
f);
28487 if (
type == 258 && Main.getGoodWorld)
28488 {
28489 Main.dust[
num89].noLight =
true;
28490 }
28491 Main.dust[
num89].noGravity =
true;
28492 Main.dust[
num89].velocity.X *= 0.3f;
28493 Main.dust[
num89].velocity.Y *= 0.3f;
28494 }
28495 }
28497 {
28499 }
28500 if (this.
ai[1] >= 20f)
28501 {
28502 velocity.Y += 0.2f;
28503 }
28505 {
28508 {
28510 }
28511 }
28512 else
28513 {
28515 }
28517 {
28519 }
28520 }
28522 {
28524 }
28526 {
28528 }
28530 {
28533 {
28535 {
28537 }
28539 {
28541 }
28545 {
28548 }
28550 {
28552 }
28553 if (Main.rand.Next(6) == 0)
28554 {
28557 {
28559 }
28560 else if (
type == 87)
28561 {
28563 }
28567 dust212.velocity *= 0.3f;
28569 }
28570 }
28571 else
28572 {
28574 }
28576 {
28577 if (Main.player[
owner].blueFairy)
28578 {
28580 }
28581 }
28582 else if (
type == 86)
28583 {
28584 if (Main.player[
owner].redFairy)
28585 {
28587 }
28588 }
28589 else if (
type == 87)
28590 {
28591 if (Main.player[
owner].greenFairy)
28592 {
28594 }
28595 }
28596 else if (
type == 18 && Main.player[
owner].lightOrb)
28597 {
28599 }
28600 if (!Main.player[
owner].dead)
28601 {
28604 {
28606 }
28607 Vector2
vector68 =
default(Vector2);
28614 {
28615 if (Main.player[
owner].controlUp)
28616 {
28620 }
28621 else if (Main.player[
owner].controlDown)
28622 {
28626 }
28627 }
28629 {
28631 }
28635 {
28636 base.position.X = Main.player[
owner].position.X + (float)(Main.player[
owner].width / 2) - (float)(
width / 2);
28637 base.position.Y = Main.player[
owner].position.Y + (float)(Main.player[
owner].height / 2) - (float)(
height / 2);
28638 }
28640 {
28645 velocity.X =
num93;
28646 velocity.Y =
num94;
28648 {
28650 }
28651 }
28652 else
28653 {
28654 velocity.X = (velocity.Y = 0
f);
28655 }
28656 }
28657 else
28658 {
28660 }
28661 }
28663 {
28665 {
28668 }
28670 {
28673 {
28675 }
28677 {
28679 }
28680 if (this.
ai[0] > 3f)
28681 {
28682 velocity.Y += 0.075f;
28684 {
28689 Main.dust[
num104].noGravity =
true;
28692 dust212.velocity *= 0.1f;
28695 dust212.velocity +=
velocity * 0.5f;
28698 }
28699 if (Main.rand.Next(8) == 0)
28700 {
28705 dust212.velocity *= 0.25f;
28708 dust212.velocity +=
velocity * 0.5f;
28709 }
28710 }
28711 else
28712 {
28714 }
28715 return;
28716 }
28720 {
28723 }
28726 {
28728 }
28729 if (this.
ai[0] > 3f)
28730 {
28733 {
28735 {
28740 Main.dust[
num115].noGravity =
true;
28743 dust212.velocity *= 0.3f;
28746 dust212.velocity +=
velocity * 0.5f;
28749 }
28750 if (Main.rand.Next(8) == 0)
28751 {
28756 dust212.velocity *= 0.5f;
28759 dust212.velocity +=
velocity * 0.5f;
28760 }
28761 }
28762 }
28763 else
28764 {
28766 }
28767 }
28769 {
28772 {
28776 }
28778 {
28780 return;
28781 }
28783 {
28786 }
28788 {
28789 if (
base.position.X + (
float)(
width / 2) > Main.player[
owner].position.X + (
float)(Main.player[
owner].width / 2))
28790 {
28791 Main.player[
owner].ChangeDir(1);
28792 }
28793 else
28794 {
28795 Main.player[
owner].ChangeDir(-1);
28796 }
28797 }
28799 {
28800 if (this.
ai[0] == 0f)
28801 {
28803 }
28804 else
28805 {
28807 }
28808 }
28809 Vector2
vector79 =
default(Vector2);
28814 if (this.
ai[0] == 0f)
28815 {
28817 {
28819 }
28821 {
28823 }
28825 {
28827 }
28829 {
28831 }
28833 {
28835 }
28838 if (this.
ai[1] > 5f)
28839 {
28841 }
28842 if (
type == 262 && this.
ai[1] > 8f)
28843 {
28845 }
28846 if (
type == 271 && this.
ai[1] > 8f)
28847 {
28849 }
28850 if (
type == 273 && this.
ai[1] > 8f)
28851 {
28853 }
28854 if (
type == 481 && this.
ai[1] > 8f)
28855 {
28857 }
28858 if (
type == 404 && this.
ai[1] > 8f)
28859 {
28861 }
28862 if (this.
ai[1] >= 10f)
28863 {
28865 velocity.Y += 0.3f;
28866 }
28868 {
28870 }
28871 else if (
type == 262)
28872 {
28874 }
28876 {
28878 }
28879 else if (
type == 271)
28880 {
28882 }
28883 }
28884 else if (this.
ai[0] == 1f)
28885 {
28890 {
28892 }
28894 {
28896 }
28903 {
28905 }
28906 else if (
type == 262)
28907 {
28909 }
28911 {
28913 }
28914 else if (
type == 271)
28915 {
28917 }
28918 }
28919 }
28921 {
28922 if (
type == 870 && this.
ai[1] > 0f)
28923 {
28925 }
28926 if (
type == 473 && Main.netMode != 2)
28927 {
28930 {
28933 val4 = base.Center - Main.player[Main.myPlayer].Center;
28934 if (((Vector2)(
ref val4)).Length() < (
float)(Main.screenWidth +
num124 * 16))
28935 {
28936 Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(
base.Center);
28937 }
28938 }
28939 }
28941 {
28943 {
28945 }
28948 {
28951 }
28952 else if (
alpha >= 255)
28953 {
28956 }
28958 }
28960 {
28962 {
28965 }
28968 {
28969 Lighting.AddLight(
base.Center, 0.25f, 0.2f, 0
f);
28970 }
28971 else
28972 {
28973 Lighting.AddLight(
base.Center, 0.15f, 0.15f, 0.15f);
28974 }
28976 {
28977 Vector2
vector88 =
default(Vector2);
28979 {
28982 float num127 = Main.rand.Next(-20, 21);
28983 float num128 = Main.rand.Next(-20, 0);
28988 num127 *= 1
f + (float)Main.rand.Next(-30, 31) * 0.01f;
28989 num128 *= 1
f + (float)Main.rand.Next(-30, 31) * 0.01f;
28990 int num131 =
NewProjectile(
GetProjectileSource_FromThis(),
vector88.X,
vector88.Y,
num127,
num128, 347, 40, 0
f, Main.myPlayer, 0
f,
this.ai[1]);
28991 }
28992 }
28993 }
28995 {
28996 int num132 = Main.rand.Next(1, 3);
28998 {
29002 dust212.alpha += Main.rand.Next(100);
29005 dust212.velocity *= 0.3f;
29006 Main.dust[
num134].velocity.X += (float)Main.rand.Next(-10, 11) * 0.025f;
29007 Main.dust[
num134].velocity.Y -= 0.4f + (float)Main.rand.Next(-3, 14) * 0.15f;
29008 Main.dust[
num134].fadeIn = 1.25f + (float)Main.rand.Next(20) * 0.15f;
29009 }
29010 }
29012 {
29013 try
29014 {
29020 {
29022 }
29023 if (
num136 > Main.maxTilesX)
29024 {
29025 num136 = Main.maxTilesX;
29026 }
29028 {
29030 }
29031 if (
num138 > Main.maxTilesY)
29032 {
29033 num138 = Main.maxTilesY;
29034 }
29035 Vector2
vector89 =
default(Vector2);
29037 {
29039 {
29041 {
29042 vector89.X =
num139 * 16;
29043 vector89.Y =
num140 * 16;
29045 {
29047 velocity.Y = -0.2f;
29048 }
29049 }
29050 }
29051 }
29052 }
29053 catch
29054 {
29055 }
29056 }
29058 {
29060 {
29063 {
29065 }
29066 }
29067 if (Main.expertMode)
29068 {
29077 {
29080 }
29081 }
29082 }
29084 {
29086 {
29089 }
29092 {
29094 }
29096 if (this.
ai[0] > 15f)
29097 {
29099 {
29100 velocity.X *= 0.97f;
29103 {
29105 }
29106 }
29108 velocity.Y += 0.2f;
29109 }
29111 {
29116 {
29118 }
29120 {
29122 }
29123 if (Main.rand.Next(
maxValue) == 0)
29124 {
29125 Dust
dust210 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
width / 2,
height / 2), 31);
29128 dust212.velocity *= 0.33f;
29129 dust210.scale = 0.7f;
29130 }
29131 if (Main.rand.Next(
maxValue) == 0)
29132 {
29133 Dust
dust211 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(
width / 2,
height / 2), 228, Main.rand.NextVector2Circular(3
f, 3
f));
29134 dust211.scale = 0.6f;
29137 dust212.velocity *= 0.33f;
29138 }
29139 }
29140 }
29141 else if (
type == 277)
29142 {
29144 if (this.
ai[0] > 15f)
29145 {
29148 {
29149 velocity.X *= 0.97f;
29151 {
29153 }
29154 }
29155 velocity.Y += 0.2f;
29156 }
29158 }
29159 else if (
type == 378)
29160 {
29162 {
29165 }
29168 Rectangle
value12 =
default(Rectangle);
29170 {
29172 {
29175 {
29177 return;
29178 }
29179 }
29180 }
29182 if (this.
ai[0] > 10f)
29183 {
29186 {
29187 velocity.X *= 0.96f;
29189 {
29191 }
29192 }
29193 velocity.Y += 0.2f;
29194 }
29196 }
29197 else if (
type == 483)
29198 {
29200 if (this.
ai[0] > 5f)
29201 {
29202 if (
owner == Main.myPlayer &&
this.ai[0] > (
float)Main.rand.Next(20, 130))
29203 {
29205 }
29207 {
29208 velocity.X *= 0.97f;
29210 {
29213 }
29214 }
29215 velocity.Y += 0.3f;
29216 velocity.X *= 0.99f;
29217 }
29219 }
29220 else if (
type == 538)
29221 {
29224 {
29227 }
29228 else if (this.
ai[0] > 5f)
29229 {
29230 velocity.Y += 0.1f;
29231 velocity.X *= 1.025f;
29235 {
29237 }
29238 }
29239 if (
alpha >= 255 && this.
ai[0] > 5f)
29240 {
29242 return;
29243 }
29244 }
29245 else
29246 {
29248 if (this.
ai[0] > 5f)
29249 {
29252 {
29253 velocity.X *= 0.97f;
29255 {
29258 }
29259 }
29260 velocity.Y += 0.2f;
29261 }
29263 }
29265 {
29267 {
29270 }
29272 {
29273 if (Main.rand.Next(4) == 0)
29274 {
29279 dust212.scale += (float)Main.rand.Next(50) * 0.01f;
29280 Main.dust[
num147].noGravity =
true;
29281 Main.dust[
num147].velocity.Y -= 2
f;
29282 }
29283 if (Main.rand.Next(6) == 0)
29284 {
29289 dust212.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
29290 Main.dust[
num148].noGravity =
true;
29293 dust212.velocity *= 0.1f;
29294 }
29295 }
29296 }
29298 {
29299 if (this.
ai[1] == 0f)
29300 {
29303 }
29304 if (Main.rand.Next(2) == 0)
29305 {
29307 Main.dust[
num149].position.X -= 2
f;
29308 Main.dust[
num149].position.Y += 2
f;
29311 dust212.scale += (float)Main.rand.Next(50) * 0.01f;
29312 Main.dust[
num149].noGravity =
true;
29313 Main.dust[
num149].velocity.Y -= 2
f;
29314 }
29315 if (Main.rand.Next(4) == 0)
29316 {
29318 Main.dust[
num150].position.X -= 2
f;
29319 Main.dust[
num150].position.Y += 2
f;
29322 dust212.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
29323 Main.dust[
num150].noGravity =
true;
29326 dust212.velocity *= 0.1f;
29327 }
29329 {
29332 {
29334 }
29335 }
29336 if ((
double)velocity.Y < 0.25 && (double)
velocity.Y > 0.15)
29337 {
29338 velocity.X *= 0.8f;
29339 }
29341 }
29343 {
29346 Main.dust[
num151].position.X -= 2
f;
29347 Main.dust[
num151].position.Y += 2
f;
29350 dust212.scale += (float)Main.rand.Next(50) * 0.01f;
29351 Main.dust[
num151].noGravity =
true;
29352 Main.dust[
num151].velocity.Y -= 2
f;
29353 if (Main.rand.Next(2) == 0)
29354 {
29356 Main.dust[
num153].position.X -= 2
f;
29357 Main.dust[
num153].position.Y += 2
f;
29360 dust212.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
29361 Main.dust[
num153].noGravity =
true;
29364 dust212.velocity *= 0.1f;
29365 }
29366 }
29368 {
29370 {
29372 }
29373 if (this.
ai[1] == 0f &&
type >= 326 &&
type <= 328)
29374 {
29377 }
29378 if (Main.rand.Next(3) != 0)
29379 {
29381 dust2.velocity.Y -= 2
f;
29382 dust2.noGravity = true;
29385 dust212.scale += Main.rand.NextFloat() * 0.8f + 0.3f;
29389 }
29391 {
29392 velocity.X *= 0.8f;
29393 }
29395 }
29397 {
29399 {
29401 }
29402 if (this.
ai[1] == 0f &&
type >= 326 &&
type <= 328)
29403 {
29406 }
29408 Main.dust[
num154].position.X -= 2
f;
29409 Main.dust[
num154].position.Y += 2
f;
29412 dust212.scale += (float)Main.rand.Next(50) * 0.01f;
29413 Main.dust[
num154].noGravity =
true;
29414 Main.dust[
num154].velocity.Y -= 2
f;
29415 if (Main.rand.Next(2) == 0)
29416 {
29418 Main.dust[
num155].position.X -= 2
f;
29419 Main.dust[
num155].position.Y += 2
f;
29422 dust212.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
29423 Main.dust[
num155].noGravity =
true;
29426 dust212.velocity *= 0.1f;
29427 }
29428 if ((
double)velocity.Y < 0.25 && (double)
velocity.Y > 0.15)
29429 {
29430 velocity.X *= 0.8f;
29431 }
29433 }
29435 {
29437 }
29438 }
29440 {
29442 }
29444 {
29446 }
29448 {
29450 {
29451 velocity.X *= 0.98f;
29452 }
29454 velocity.Y += 0.2f;
29456 {
29459 }
29460 if (
owner != Main.myPlayer)
29461 {
29462 return;
29463 }
29467 {
29468 return;
29469 }
29470 int style = 0;
29472 {
29473 style =
type - 200;
29474 }
29476 {
29477 style =
type - 527 + 6;
29478 }
29480 TileObject
objectData =
default(TileObject);
29482 {
29484 }
29486 {
29491 {
29493 NetMessage.SendData(47, -1, -1,
null,
num158, 0
f, (
int)(byte)
new BitsByte(
b1:
true));
29494 }
29496 }
29497 }
29499 {
29500 if (this.
ai[1] == 0f &&
type == 44)
29501 {
29504 }
29506 {
29508 {
29510 }
29514 {
29516 }
29517 else
29518 {
29520 }
29521 return;
29522 }
29525 if (!(this.
ai[0] < 30f))
29526 {
29527 if (this.
ai[0] < 100f)
29528 {
29530 }
29531 else
29532 {
29534 }
29535 }
29537 {
29539 Main.dust[
num160].noGravity =
true;
29540 }
29541 }
29543 {
29545 }
29547 {
29550 {
29553 {
29556 }
29558 {
29560 }
29561 }
29563 {
29566 {
29569 }
29571 {
29573 }
29574 }
29576 {
29579 }
29580 Vector2
vector92 = Main.player[
owner].RotatedRelativePoint(Main.player[
owner].MountedCenter);
29581 if (Main.myPlayer ==
owner)
29582 {
29583 if (Main.player[
owner].channel)
29584 {
29587 float num162 = (float)Main.mouseX + Main.screenPosition.X -
vector93.X;
29588 float num164 = (float)Main.mouseY + Main.screenPosition.Y -
vector93.Y;
29589 if (Main.player[
owner].gravDir == -1
f)
29590 {
29591 num164 = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y -
vector93.Y;
29592 }
29599 {
29601 }
29604 }
29605 else
29606 {
29608 }
29609 }
29611 {
29612 Main.player[
owner].ChangeDir(1);
29613 }
29615 {
29616 Main.player[
owner].ChangeDir(-1);
29617 }
29621 Main.player[
owner].SetDummyItemTime(2);
29622 base.position.X = vector92.X - (float)(
width / 2);
29623 base.position.Y = vector92.Y - (float)(
height / 2);
29625 if (Main.player[
owner].direction == 1)
29626 {
29628 }
29629 else
29630 {
29632 }
29633 velocity.X *= 1
f + (float)Main.rand.Next(-3, 4) * 0.01f;
29634 if (Main.rand.Next(6) == 0)
29635 {
29637 Main.dust[
num166].position.X -= 4
f;
29638 Main.dust[
num166].noGravity =
true;
29641 dust212.velocity *= 0.2f;
29642 Main.dust[
num166].velocity.Y = (float)(-Main.rand.Next(7, 13)) * 0.15
f;
29643 }
29644 }
29646 {
29649 if (Main.rand.Next(3) == 0)
29650 {
29652 Main.dust[
num167].noGravity =
true;
29655 dust212.velocity *= 0.2f;
29656 }
29657 if (this.
ai[1] == 1f)
29658 {
29660 Main.musicPitch = this.
ai[0];
29662 }
29663 }
29665 {
29667 {
29669 }
29672 if (this.
ai[1] < 0f)
29673 {
29675 {
29677 }
29679 {
29681 }
29682 else
29683 {
29685 }
29691 {
29693 }
29694 if (
num169 > Main.maxTilesX)
29695 {
29696 num169 = Main.maxTilesX;
29697 }
29699 {
29701 }
29702 if (
num171 > Main.maxTilesY)
29703 {
29704 num171 = Main.maxTilesY;
29705 }
29708 Vector2
vector94 =
default(Vector2);
29710 {
29712 {
29714 {
29715 vector94.X =
num175 * 16;
29716 vector94.Y =
num176 * 16;
29718 {
29720 }
29721 }
29722 }
29723 }
29725 Main.dust[
num177].noGravity =
true;
29728 dust212.velocity *= 0.3f;
29729 return;
29730 }
29731 if (this.
ai[0] < 0f)
29732 {
29733 if (this.
ai[0] == -1f)
29734 {
29736 {
29738 Main.dust[
num179].noGravity =
true;
29741 dust212.velocity *= 1.3f;
29742 }
29743 }
29744 else if (Main.rand.Next(30) == 0)
29745 {
29749 dust212.velocity *= 0.2f;
29750 }
29754 {
29756 }
29758 if (this.
ai[0] <= -900f && (Main.myPlayer ==
owner || Main.netMode == 2) && Main.tile[
num181,
num182].active() && Main.tile[
num181,
num182].type == 127)
29759 {
29761 if (Main.netMode == 1)
29762 {
29763 NetMessage.SendData(17, -1, -1,
null, 0,
num181,
num182);
29764 }
29766 }
29767 return;
29768 }
29774 {
29776 }
29777 if (
num184 > Main.maxTilesX)
29778 {
29779 num184 = Main.maxTilesX;
29780 }
29782 {
29784 }
29785 if (
num188 > Main.maxTilesY)
29786 {
29787 num188 = Main.maxTilesY;
29788 }
29791 Vector2
vector95 =
default(Vector2);
29793 {
29795 {
29797 {
29798 vector95.X =
num191 * 16;
29799 vector95.Y =
num192 * 16;
29801 {
29803 }
29804 }
29805 }
29806 }
29808 {
29810 }
29814 {
29816 }
29818 {
29819 return;
29820 }
29822 Main.dust[
num195].noGravity =
true;
29825 dust212.velocity *= 0.3f;
29829 {
29831 {
29833 {
29835 }
29837 {
29839 }
29841 {
29843 }
29845 {
29847 }
29849 {
29851 }
29853 {
29855 }
29856 }
29858 {
29860 }
29862 {
29864 }
29866 {
29868 }
29870 {
29872 }
29874 {
29876 }
29878 {
29880 }
29881 }
29883 {
29885 }
29886 else
29887 {
29889 }
29890 if (Main.myPlayer !=
owner)
29891 {
29892 return;
29893 }
29898 {
29900 }
29902 {
29904 }
29906 {
29907 return;
29908 }
29910 {
29911 if (Main.netMode == 1)
29912 {
29913 NetMessage.SendData(17, -1, -1,
null, 1,
num196,
num198, 127
f);
29914 }
29919 base.position.X =
num196 * 16;
29920 base.position.Y =
num198 * 16;
29922 }
29923 else
29924 {
29926 }
29927 }
29929 {
29931 {
29932 if (this.
ai[0] < 8f)
29933 {
29935 }
29937 }
29939 {
29941 }
29942 if (this.
ai[0] > 7f)
29943 {
29945 if (this.
ai[0] == 8f)
29946 {
29948 }
29949 else if (this.
ai[0] == 9f)
29950 {
29952 }
29953 else if (this.
ai[0] == 10f)
29954 {
29956 }
29960 {
29962 }
29963 if (
num202 == 6 || Main.rand.Next(2) == 0)
29964 {
29966 {
29970 if (Main.rand.Next(3) != 0 || (
num202 == 75 && Main.rand.Next(3) == 0))
29971 {
29972 Main.dust[
num204].noGravity =
true;
29975 dust212.scale *= 3
f;
29976 Main.dust[
num204].velocity.X *= 2
f;
29977 Main.dust[
num204].velocity.Y *= 2
f;
29978 }
29980 {
29983 dust212.scale *= 1.25f;
29984 }
29985 else
29986 {
29989 dust212.scale *= 1.5f;
29990 }
29991 Main.dust[
num204].velocity.X *= 1.2f;
29992 Main.dust[
num204].velocity.Y *= 1.2f;
29995 dust212.scale *=
num201;
29997 {
30001 if (!Main.dust[
num204].noGravity)
30002 {
30005 dust212.velocity *= 0.5f;
30006 }
30007 }
30008 }
30009 }
30010 }
30011 else
30012 {
30014 }
30016 }
30018 {
30023 {
30024 if (Main.rand.Next(4) == 0)
30025 {
30027 Main.dust[
num205].noGravity =
true;
30030 dust212.velocity *= 0.5f;
30033 dust212.scale *= 0.9f;
30034 }
30036 if (this.
ai[1] > 130f)
30037 {
30039 if ((
double)
scale <= 0.2)
30040 {
30043 }
30044 }
30045 return;
30046 }
30048 if (this.
ai[1] > 15f)
30049 {
30051 if ((
double)
scale <= 0.2)
30052 {
30055 }
30056 }
30057 }
30059 {
30061 {
30063 }
30065 {
30066 frame = Main.tileFrame[665];
30067 }
30069 {
30071 int i2 = (int)((
base.position.X - 8
f) / 16
f);
30074 bool flag2 =
false;
30076 {
30078 }
30081 {
30083 }
30085 {
30087 }
30089 {
30091 }
30092 else
30093 {
30094 i2 = (int)((
base.position.X - 8
f - 16
f) / 16
f);
30099 {
30101 }
30104 {
30106 }
30108 {
30110 }
30112 {
30114 }
30115 else
30116 {
30117 i2 = (int)((
base.position.X - 8
f - 32
f) / 16
f);
30122 {
30124 }
30127 {
30129 }
30131 {
30132 if ((
int)(base.Center.X / 16
f) % 2 == 0)
30133 {
30135 }
30136 else
30137 {
30139 }
30140 }
30142 {
30144 }
30146 {
30148 }
30149 }
30150 }
30151 }
30155 {
30157 }
30159 {
30161 {
30162 if (
velocity.X > 0
f && (
double)velocity.X < 3.5)
30163 {
30164 velocity.X += 0.025f;
30165 }
30166 if (
velocity.X < 0
f && (
double)velocity.X > -3.5)
30167 {
30168 velocity.X -= 0.025f;
30169 }
30170 }
30171 }
30173 {
30175 {
30176 velocity.X += 0.05f;
30177 }
30179 {
30180 velocity.X -= 0.05f;
30181 }
30182 }
30184 {
30185 velocity.Y += 0.06f;
30186 }
30187 else
30188 {
30189 velocity.Y += 0.3f;
30190 }
30192 {
30194 }
30195 }
30197 {
30199 }
30201 {
30203 {
30205 if (this.
ai[0] < 30f)
30206 {
30208 }
30209 }
30211 {
30214 {
30222 dust212.velocity *= 0.25f;
30226 }
30227 }
30229 {
30230 int num1077 = Main.rand.Next(3);
30232 {
30233 0 => 15,
30234 1 => 57,
30235 _ => 58,
30236 }, 0
f, 0
f, 100,
default(Color), 1.25f);
30239 dust212.velocity *= 0.1f;
30240 }
30242 {
30246 dust212.velocity *= -0.25f;
30250 dust212.velocity *= -0.25f;
30253 dust212.position -=
velocity * 0.5f;
30254 }
30256 {
30258 }
30259 else
30260 {
30262 {
30266 dust212.velocity *= -0.25f;
30267 }
30268 else if (
type == 116)
30269 {
30273 dust212.velocity *= -0.25f;
30274 Main.dust[
num216].noGravity =
true;
30275 }
30277 {
30281 {
30284 }
30285 }
30287 {
30291 {
30294 }
30295 }
30296 }
30297 if (this.
ai[1] == 0f)
30298 {
30301 {
30303 }
30304 else
30305 {
30307 }
30308 }
30310 {
30313 }
30314 else
30315 {
30317 }
30319 {
30321 }
30322 }
30324 {
30326 {
30329 {
30331 int num217 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 219,
velocity.X,
velocity.Y, 0,
default(Color), 0.35f + (float)Main.rand.Next(-5, 5) * 0.01f);
30332 Main.dust[
num217].noGravity =
true;
30334 }
30336 {
30340 {
30342 }
30343 }
30344 }
30346 {
30348 {
30349 int num220 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 137,
velocity.X,
velocity.Y, Main.rand.Next(0, 101),
default(Color), 1
f + (float)Main.rand.Next(-20, 40) * 0.01f);
30350 Main.dust[
num220].noGravity =
true;
30353 dust212.velocity *= 0.3f;
30354 }
30355 }
30357 {
30359 {
30361 Main.dust[
num222].noGravity =
true;
30364 dust212.velocity *= 0.3f;
30365 }
30366 }
30368 {
30370 {
30372 Main.dust[
num224].noGravity =
true;
30375 dust212.velocity *= 0.3f;
30376 }
30377 }
30379 {
30381 {
30383 Main.dust[
num226].noGravity =
true;
30386 dust212.velocity *= 0.3f;
30387 }
30388 }
30390 {
30392 {
30394 Main.dust[
num228].noGravity =
true;
30397 dust212.velocity *= 0.1f + (float)Main.rand.Next(4) * 0.1f;
30400 dust212.scale *= 1
f + (float)Main.rand.Next(5) * 0.1f;
30401 }
30402 }
30403 if (this.
ai[1] != 0f)
30404 {
30405 return;
30406 }
30409 {
30411 {
30412 int num231 = Dust.NewDust(
new Vector2(
base.position.X,
base.position.Y),
width,
height, 219,
velocity.X,
velocity.Y, 0,
default(Color), 0.4f + (float)Main.rand.Next(-20, 40) * 0.01f);
30413 Main.dust[
num231].noGravity =
true;
30414 Main.dust[
num231].velocity = (
velocity * 0.5f).RotatedByRandom(0.5);
30415 }
30417 }
30418 else
30419 {
30421 }
30422 }
30424 {
30426 {
30429 {
30432 Main.dust[
num235].noGravity =
true;
30435 dust212.velocity *= 0.5f;
30436 }
30438 {
30441 {
30442 case 0:
30443 Main.dust[
num234].position = (Main.dust[
num234].position + base.Center * 5
f) / 6
f;
30444 break;
30445 case 1:
30447 break;
30448 }
30451 dust212.velocity *= 0.1f;
30452 Main.dust[
num234].noGravity =
true;
30453 Main.dust[
num234].fadeIn = 1
f;
30454 }
30455 }
30456 else if (
type == 620)
30457 {
30460 float num238 = (60
f - this.
ai[1]) / 60f;
30461 if (this.
ai[1] > 40f)
30462 {
30464 }
30465 velocity.Y += 0.2f;
30467 {
30469 }
30470 velocity.X *= 0.98f;
30472 {
30475 Main.dust[
num241].noGravity =
true;
30478 dust212.velocity *= 0.3f;
30481 dust212.scale *=
num238;
30482 }
30484 {
30486 Main.dust[
num240].position = (Main.dust[
num240].position + base.Center * 5
f) / 6
f;
30489 dust212.velocity *= 0.1f;
30490 Main.dust[
num240].noGravity =
true;
30494 dust212.scale *=
num238;
30495 }
30496 }
30497 else if (
type == 521)
30498 {
30500 {
30503 Main.dust[
num246].noGravity =
true;
30506 dust212.velocity *= 0.5f;
30507 }
30509 {
30512 {
30513 case 0:
30514 Main.dust[
num245].position = (Main.dust[
num245].position + base.Center * 5
f) / 6
f;
30515 break;
30516 case 1:
30518 break;
30519 }
30522 dust212.velocity *= 0.1f;
30523 Main.dust[
num245].noGravity =
true;
30524 Main.dust[
num245].fadeIn = 1
f;
30525 }
30526 }
30527 else if (
type == 522)
30528 {
30530 float num248 = (60
f - this.
ai[1]) / 60f;
30531 if (this.
ai[1] > 40f)
30532 {
30534 }
30535 velocity.Y += 0.2f;
30537 {
30539 }
30540 velocity.X *= 0.98f;
30542 {
30545 Main.dust[
num251].noGravity =
true;
30548 dust212.velocity *= 0.3f;
30551 dust212.scale *=
num248;
30552 }
30554 {
30556 Main.dust[
num250].position = (Main.dust[
num250].position + base.Center * 5
f) / 6
f;
30559 dust212.velocity *= 0.1f;
30560 Main.dust[
num250].noGravity =
true;
30564 dust212.scale *=
num248;
30565 }
30566 }
30567 else if (
type == 731)
30568 {
30570 {
30573 {
30575 }
30576 }
30579 {
30581 }
30583 if ((
int)this.
ai[0] % 2 != 0 && Main.rand.Next(4) == 0)
30584 {
30586 }
30588 switch ((
int)this.
ai[0])
30589 {
30590 case 10:
30592 break;
30593 case 12:
30595 break;
30596 case 18:
30598 break;
30599 case 20:
30602 break;
30603 }
30604 if (Main.rand.Next(3) == 0)
30605 {
30607 dust3.noGravity = true;
30608 dust3.velocity = dust3.velocity * 0
f +
velocity * 0.5f;
30609 if (Main.rand.Next(3) != 0)
30610 {
30613 dust212.velocity *= 1.4f;
30614 }
30615 }
30616 Lighting.AddLight(
base.Center, 0.2f, 0.5f, 0.7f);
30617 }
30618 else
30619 {
30622 {
30624 }
30626 {
30628 Main.dust[
num257].noGravity =
true;
30631 dust212.velocity *= 0.3f;
30632 }
30633 if (this.
ai[1] == 0f)
30634 {
30637 }
30638 }
30639 }
30641 {
30643 {
30646 if (Main.rand.Next(
Math.Max(4, 8 - (
int)((Vector2)(
ref velocity)).Length())) == 0)
30647 {
30649 int num261 = Dust.NewDust(
base.position +
new Vector2((
float)
num260, (float)
num260),
width -
num260 * 2,
height -
num260 * 2, 43, 0
f, 0
f, 254,
new Color(255, 255, 0));
30651 }
30652 if (this.
ai[0] > num259)
30653 {
30656 }
30657 else
30658 {
30661 {
30663 }
30664 }
30667 if (Main.myPlayer ==
owner &&
this.ai[0] <
num259 &&
this.ai[0] % 10
f == 0
f)
30668 {
30669 float num263 = (float)
Math.PI / 2
f * (
float)((this.
ai[0] % 20f != 0
f) ? 1 : (-1));
30674 val4 =
default(Vector2);
30676 v3 =
v3.SafeNormalize(Vector2.Zero);
30677 v3 *=
Math.Max(2.5
f, (
num259 - this.
ai[0]) / num259 * (7
f + (-2
f + (float)Main.rand.Next(2) * 2
f)));
30679 }
30681 {
30683 }
30684 if (this.
ai[0] > num258)
30685 {
30687 }
30688 }
30689 else if (
type == 335)
30690 {
30692 if (this.
ai[0] < 0f)
30693 {
30694 velocity.Y += 0.25f;
30696 {
30698 }
30699 }
30700 else
30701 {
30702 if (Main.rand.Next(
Math.Max(4, 8 - (
int)((Vector2)(
ref velocity)).Length())) == 0)
30703 {
30706 {
30707 case 0:
30709 break;
30710 case 1:
30712 break;
30713 case 2:
30715 break;
30716 case 3:
30718 break;
30719 }
30723 }
30725 }
30726 if (this.
ai[0] >= 0f && ((Vector2)(
ref velocity)).Length() < 0.25f)
30727 {
30729 {
30731 if (Main.netMode != 1)
30732 {
30735 }
30736 }
30738 }
30739 localAI[0]++;
30741 }
30742 else
30743 {
30748 {
30750 }
30751 }
30752 }
30754 {
30755 bool flag3 = this.
ai[1] == 1f;
30759 {
30760 default:
30763 break;
30764 case 147:
30767 break;
30768 case 146:
30771 break;
30772 case 148:
30775 break;
30776 case 149:
30779 break;
30780 case 1015:
30783 break;
30784 case 1016:
30787 break;
30788 case 1017:
30791 break;
30792 }
30793 if (
owner == Main.myPlayer)
30794 {
30795 int size = 2;
30797 {
30798 size = 3;
30799 }
30800 Point point =
base.Center.ToTileCoordinates();
30802 }
30804 {
30806 }
30809 {
30811 }
30812 if (this.
ai[0] > (
float)num271)
30813 {
30815 if (this.
ai[0] == (
float)(num271 + 1))
30816 {
30818 }
30819 else if (this.
ai[0] == (
float)(num271 + 2))
30820 {
30822 }
30823 else if (this.
ai[0] == (
float)(num271 + 3))
30824 {
30826 }
30827 else if (this.
ai[0] == (
float)(num271 + 4))
30828 {
30830 }
30833 {
30836 }
30839 {
30841 Main.dust[
num275].noGravity =
true;
30844 dust212.scale *= 1.75f;
30845 Main.dust[
num275].velocity.X *= 2
f;
30846 Main.dust[
num275].velocity.Y *= 2
f;
30849 dust212.scale *=
num272;
30850 }
30851 }
30852 else
30853 {
30855 }
30857 }
30859 {
30862 if (this.
ai[0] >= 20f)
30863 {
30868 {
30871 {
30873 velocity.Y = -4.5f;
30875 {
30877 }
30879 {
30881 }
30882 velocity.X = (velocity.X + (float)
entity2.direction * 1.75f) / 2
f;
30883 velocity.X += entity2.velocity.X * 3
f;
30884 velocity.Y +=
entity2.velocity.Y;
30886 {
30888 }
30890 {
30892 }
30894 {
30896 }
30899 }
30900 }
30902 {
30904 {
30905 continue;
30906 }
30907 Entity entity = Main.projectile[
num278];
30908 if (entity.active && ((Rectangle)(
ref rectangle3)).Intersects(entity.Hitbox))
30909 {
30911 velocity.Y = -4.5f;
30913 {
30915 }
30917 {
30919 }
30920 velocity.X = (velocity.X + (float)entity.direction * 1.75f) / 2
f;
30921 velocity.X += entity.velocity.X * 3
f;
30922 velocity.Y += entity.velocity.Y;
30924 {
30926 }
30928 {
30930 }
30932 {
30934 }
30937 }
30938 }
30939 }
30941 {
30943 }
30946 {
30947 velocity.X *= 0.98f;
30948 }
30950 {
30951 velocity.X *= 0.99f;
30952 }
30953 else
30954 {
30955 velocity.X *= 0.995f;
30956 }
30958 {
30960 }
30962 {
30965 {
30966 velocity.Y *= 0.95f;
30967 }
30968 velocity.Y -= 0.1f;
30970 {
30972 }
30974 {
30976 }
30977 }
30978 else
30979 {
30980 velocity.Y += 0.1f;
30981 }
30983 {
30985 }
30986 }
30988 {
30990 {
30993 {
30995 }
30996 }
31001 {
31003 }
31009 {
31012 {
31013 case 163:
31015 break;
31016 case 310:
31018 break;
31019 case 1008:
31021 break;
31022 case 1009:
31024 break;
31025 case 1010:
31027 break;
31028 case 1011:
31030 break;
31031 }
31033 Main.dust[
num284].noGravity =
true;
31039 {
31040 Main.dust[
num284].color = Main.hslToRgb(Main.GlobalTimeWrappedHourly * 0.6f % 1
f, 1
f, 0.5f);
31043 dust212.scale *= 0.5f;
31046 dust212.velocity *= 0.75f;
31047 }
31048 }
31050 {
31051 this.
ai[0] = velocity.X;
31052 this.
ai[1] = velocity.Y;
31055 {
31056 velocity.Y += 0.09f;
31058 }
31059 }
31060 else
31061 {
31063 {
31066 }
31067 if (
type == 1008 && Main.netMode != 2)
31068 {
31070 val4 = base.Center - Main.player[Main.myPlayer].Center;
31071 if (((Vector2)(
ref val4)).Length() < (float)(Main.screenWidth +
num285 * 16))
31072 {
31073 Main.instance.SpelunkerProjectileHelper.AddSpotToCheck(
base.Center);
31074 }
31075 }
31077 }
31079 {
31081 }
31082 rotation = (float)
Math.Atan2(
this.ai[1],
this.ai[0]) + 1.57f;
31083 }
31085 {
31087 if (this.
ai[1] == 1f)
31088 {
31090 if (this.
ai[0] == 1f)
31091 {
31093 {
31095 Main.dust[
num287].noGravity =
true;
31098 dust212.velocity *= 3
f;
31099 Main.dust[
num287].fadeIn = 0.5f;
31105 dust212.velocity +=
velocity / 4
f + Main.player[
owner].velocity * 0.1f;
31106 }
31107 }
31108 if (this.
ai[0] > 2f)
31109 {
31111 Main.dust[
num289].noGravity =
true;
31114 dust212.velocity *= 0.2f;
31117 Main.dust[
num289].noGravity =
true;
31120 dust212.velocity *= 0.2f;
31123 Main.dust[
num289].noGravity =
true;
31126 dust212.velocity *= 0.2f;
31128 }
31129 }
31130 else if (
type >= 415 &&
type <= 418)
31131 {
31133 if (this.
ai[0] > 4f)
31134 {
31136 Main.dust[
num290].noGravity =
true;
31139 dust212.velocity *= 0.2f;
31141 }
31142 }
31143 else
31144 {
31146 Main.dust[
num291].noGravity =
true;
31149 dust212.velocity *= 0.2f;
31151 }
31152 }
31154 {
31156 if (this.
ai[0] > 30f)
31157 {
31158 velocity.Y += 0.2f;
31159 velocity.X *= 0.985f;
31161 {
31163 }
31164 }
31166 if (
owner != Main.myPlayer)
31167 {
31168 return;
31169 }
31171 bool flag4 =
false;
31173 {
31175 }
31176 else
31177 {
31181 {
31183 base.position.Y =
num293 * 16 + 16 + 8;
31184 base.position.X =
num292 * 16 + 8;
31185 }
31186 }
31188 {
31189 return;
31190 }
31193 {
31195 }
31197 {
31199 }
31201 {
31203 }
31209 {
31210 return;
31211 }
31213 {
31214 }
31215 bool flag5 =
false;
31217 {
31218 bool flag6 =
false;
31220 {
31221 break;
31222 }
31224 {
31226 {
31228 }
31230 {
31233 NetMessage.SendData(17, -1, -1,
null, 0,
num295,
num296);
31234 }
31235 }
31237 {
31243 }
31245 {
31247 }
31249 {
31251 }
31253 }
31255 }
31257 {
31259 {
31261 }
31263 {
31265 }
31266 else
31267 {
31269 }
31271 {
31273 }
31275 {
31279 {
31282 }
31284 {
31286 }
31288 {
31292 Main.dust[
num303].position.X = base.Center.X -
num301;
31293 Main.dust[
num303].position.Y = base.Center.Y -
num302;
31296 dust212.velocity *= 0
f;
31297 Main.dust[
num303].scale = 0.5f;
31298 }
31299 }
31300 else
31301 {
31303 {
31305 {
31307 }
31309 {
31311 }
31312 }
31314 {
31316 }
31318 {
31320 }
31324 {
31327 }
31329 {
31331 }
31332 }
31336 bool flag7 =
false;
31338 if (this.
ai[0] > 30f)
31339 {
31342 {
31343 if (Main.npc[
num307].CanBeChasedBy(
this) && (!Main.npc[
num307].wet || Main.npc[
num307].type == 370 ||
type == 307))
31344 {
31349 {
31354 }
31355 }
31356 }
31357 }
31359 {
31360 num304 = base.position.X + (float)(
width / 2) + velocity.X * 100
f;
31361 num305 = base.position.Y + (float)(
height / 2) + velocity.Y * 100
f;
31362 }
31363 else if (
type == 307)
31364 {
31366 }
31370 {
31373 }
31375 {
31378 }
31380 {
31382 {
31385 }
31386 else
31387 {
31390 }
31391 }
31393 {
31396 }
31397 Vector2
vector97 =
default(Vector2);
31407 {
31410 {
31412 }
31413 }
31415 {
31418 {
31420 }
31421 }
31423 {
31426 {
31428 }
31429 }
31431 {
31434 {
31436 }
31437 }
31438 }
31440 {
31441 if (this.
ai[1] == 0f)
31442 {
31444 localAI[0] = base.Center.X - velocity.X * 1.5f;
31445 localAI[1] = base.Center.Y - velocity.Y * 1.5f;
31446 }
31447 Vector2
vector98 =
default(Vector2);
31450 if (this.
ai[0] == 0f)
31451 {
31453 {
31456 return;
31457 }
31460 {
31463 }
31464 }
31466 {
31468 }
31469 }
31471 {
31473 if (this.
ai[0] >= 6f)
31474 {
31477 if (Main.myPlayer ==
owner)
31478 {
31480 }
31481 }
31482 }
31484 {
31487 {
31489 }
31490 if (!
active || !Main.player[
owner].active || Main.player[
owner].dead || Vector2.Distance(Main.player[
owner].Center,
base.Center) > 2000
f)
31491 {
31493 return;
31494 }
31496 {
31497 Main.player[
owner].SetDummyItemTime(5);
31498 if (
base.Center.X > Main.player[
owner].Center.X)
31499 {
31500 Main.player[
owner].ChangeDir(1);
31501 }
31502 else
31503 {
31504 Main.player[
owner].ChangeDir(-1);
31505 }
31506 }
31512 {
31515 }
31517 {
31520 }
31521 if (this.
ai[1] > 0f)
31522 {
31525 if (Main.npc[
num322].active && Main.npc[
num322].life > 0)
31526 {
31533 {
31537 {
31539 {
31542 }
31543 else
31544 {
31547 }
31549 {
31552 }
31553 }
31554 }
31555 else
31556 {
31558 {
31560 }
31567 {
31570 }
31571 else
31572 {
31575 }
31576 }
31578 {
31579 base.position += Main.npc[
num322].velocity;
31581 {
31583 {
31584 if (
base.position.X < Main.projectile[
num324].position.X)
31585 {
31587 }
31588 else
31589 {
31591 }
31592 if (
base.position.Y < Main.projectile[
num324].position.Y)
31593 {
31595 }
31596 else
31597 {
31599 }
31600 }
31601 }
31602 }
31603 if (Main.myPlayer ==
owner)
31604 {
31608 {
31610 }
31611 }
31612 }
31613 else if (Main.myPlayer ==
owner)
31614 {
31618 {
31620 }
31626 {
31627 if (Main.npc[
num331].CanBeChasedBy(
this))
31628 {
31629 float x = Main.npc[
num331].Center.X;
31630 float y = Main.npc[
num331].Center.Y;
31633 {
31638 }
31639 }
31640 }
31642 {
31649 {
31651 }
31658 this.
ai[1] = num330 + 1;
31660 }
31661 }
31662 }
31663 else if (this.
ai[0] == 0f)
31664 {
31666 {
31669 }
31671 {
31674 }
31675 else
31676 {
31679 }
31680 }
31681 else if (this.
ai[0] == 1f)
31682 {
31685 {
31688 }
31689 else
31690 {
31693 }
31695 {
31698 }
31699 else
31700 {
31703 }
31706 {
31708 }
31715 {
31716 base.position += Main.player[
owner].velocity;
31717 }
31718 }
31721 {
31724 }
31726 {
31728 }
31729 }
31731 {
31734 {
31738 {
31740 }
31741 }
31744 {
31747 }
31749 {
31751 }
31752 velocity.X += this.
ai[0];
31753 velocity.Y += this.
ai[1];
31756 {
31758 this.
ai[0] = (float)Main.rand.Next(-100, 101) * 6
E-05
f;
31759 this.
ai[1] = (float)Main.rand.Next(-100, 101) * 6
E-05
f;
31760 }
31762 {
31763 velocity.X *= 0.95f;
31764 velocity.Y *= 0.95f;
31765 }
31767 {
31768 velocity.X *= 1.05f;
31769 velocity.Y *= 1.05f;
31770 }
31772 }
31774 {
31776 {
31778 frame = Main.rand.Next(3);
31779 }
31781 }
31783 {
31784 if (!Main.player[
owner].crystalLeaf)
31785 {
31787 return;
31788 }
31789 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
31790 base.position.Y = Main.player[
owner].Center.Y - (float)(
height / 2) + Main.player[
owner].gfxOffY - 60
f;
31791 if (Main.player[
owner].gravDir == -1
f)
31792 {
31793 base.position.Y += 120
f;
31795 }
31796 else
31797 {
31799 }
31800 base.position.X = (int)
base.position.X;
31801 base.position.Y = (int)
base.position.Y;
31802 float num336 = (float)(
int)Main.mouseTextColor / 200
f - 0.35f;
31805 if (
owner != Main.myPlayer || Main.player[
owner].crystalLeafCooldown != 0)
31806 {
31807 return;
31808 }
31809 float x2 =
base.position.X;
31810 float y2 =
base.position.Y;
31814 {
31815 if (Main.npc[
num338].CanBeChasedBy(
this))
31816 {
31821 {
31824 }
31825 }
31826 }
31828 {
31830 Vector2
vector99 =
default(Vector2);
31842 {
31846 }
31848 Main.player[
owner].crystalLeafCooldown = 40;
31849 }
31850 }
31852 {
31855 {
31859 {
31861 Main.dust[
num350].noGravity =
true;
31864 dust212.velocity *= 3
f;
31865 Main.dust[
num350].scale = 1.5f;
31868 dust212.velocity +=
velocity * Main.rand.NextFloat();
31869 }
31870 }
31875 value19 = Color.Lerp(
value19, Color.Lerp(Color.LimeGreen, Color.Gold, 0.3f), (float)(
int)((Color)(
ref value19)).R / 255
f * 1
f);
31877 {
31880 {
31881 PositionInWorld =
base.Center,
31883 UniqueInfoPiece = (byte)(Main.rgbToHsl(
value19).X * 255
f)
31884 });
31885 }
31886 Lighting.AddLight(
base.Center,
new Vector3(0.05
f, 0.2
f, 0.1
f) * 1.5f);
31887 if (Main.rand.Next(5) == 0)
31888 {
31890 dust4.noGravity = true;
31893 dust212.velocity *= 0.1f;
31894 dust4.scale = 1.5f;
31897 dust212.velocity +=
velocity * Main.rand.NextFloat();
31901 dust4.alpha = 100;
31902 dust4.noLight = true;
31903 }
31904 }
31906 {
31909 {
31913 {
31915 }
31916 }
31917 else if (
type == 732)
31918 {
31922 {
31924 }
31925 if (Main.rand.Next(5) == 0)
31926 {
31928 dust5.noGravity = true;
31931 dust212.velocity *= 1.2f;
31932 }
31934 Lighting.AddLight(
base.Center, 0.3f, 0.6f, 0.8f);
31935 }
31936 else if (
type == 229)
31937 {
31938 if (this.
ai[0] == 0f)
31939 {
31941 }
31943 if (this.
ai[0] > 20f)
31944 {
31945 velocity.Y += 0.3f;
31946 velocity.X *= 0.98f;
31947 }
31948 }
31950 {
31953 {
31955 }
31956 }
31957 }
31959 {
31961 {
31965 {
31966 bool flag8 =
false;
31967 bool flag9 =
false;
31969 {
31972 }
31974 {
31977 }
31979 {
31981 }
31982 }
31986 {
31990 {
31992 }
31993 }
31994 }
31995 else if (
type == 238 ||
type == 244)
31996 {
32000 if (Collision.SolidTiles(
new Vector2((
float)
num357, (
float)
num358), 2, 20))
32001 {
32003 }
32006 {
32010 {
32012 }
32013 }
32015 if (
type == 244 && this.
ai[1] >= 18000f)
32016 {
32019 {
32022 }
32023 }
32024 else if (
type == 238 && this.
ai[1] >= 18000f)
32025 {
32028 {
32031 }
32032 }
32034 {
32037 {
32038 if (this.
ai[0] > 10f)
32039 {
32041 if (
owner == Main.myPlayer)
32042 {
32043 num357 += Main.rand.Next(-14, 15);
32045 }
32046 }
32047 }
32048 else if (this.
ai[0] > 8f)
32049 {
32051 if (
owner == Main.myPlayer)
32052 {
32053 num357 += Main.rand.Next(-14, 15);
32055 }
32056 }
32057 }
32060 {
32061 return;
32062 }
32069 {
32071 {
32074 {
32077 }
32078 }
32079 }
32081 {
32083 {
32084 Main.projectile[
num360].netUpdate =
true;
32085 Main.projectile[
num360].ai[1] = 18000
f;
32086 }
32087 }
32089 {
32090 Main.projectile[
num360].netUpdate =
true;
32091 Main.projectile[
num360].ai[1] = 18000
f;
32092 }
32093 }
32095 {
32099 {
32102 }
32104 {
32106 }
32107 else if (
type == 245)
32108 {
32110 }
32111 else if (
type == 264)
32112 {
32114 }
32115 }
32116 }
32118 {
32122 {
32124 }
32127 {
32128 Point
point2 =
base.Center.ToTileCoordinates();
32130 {
32132 return;
32133 }
32134 if (
owner == Main.myPlayer)
32135 {
32138 {
32141 }
32143 {
32145 }
32146 }
32149 {
32151 }
32152 this.
ai[0] += num369;
32153 if (this.
ai[0] > 30f)
32154 {
32155 velocity.Y += 0.5f;
32157 {
32158 velocity.X *= 0.95f;
32159 }
32160 else
32161 {
32162 velocity.X *= 1.05f;
32163 }
32164 }
32174 return;
32175 }
32177 {
32179 {
32182 }
32183 else
32184 {
32187 }
32190 }
32191 velocity.X *= 0.98f;
32192 velocity.Y *= 0.98f;
32194 {
32196 }
32198 {
32200 }
32202 {
32205 }
32206 else
32207 {
32209 }
32210 }
32212 {
32214 }
32216 {
32218 {
32220 {
32228 Main.dust[
num373].scale = (float)Main.rand.Next(70, 110) * 0.013f;
32231 dust212.velocity *= 0.2f;
32232 }
32233 return;
32234 }
32236 {
32238 {
32246 if (Main.rand.Next(2) == 0)
32247 {
32248 Main.dust[
num376].color = Color.LimeGreen;
32249 }
32250 else
32251 {
32252 Main.dust[
num376].color = Color.CornflowerBlue;
32253 }
32254 Main.dust[
num376].scale = (float)Main.rand.Next(70, 110) * 0.013f;
32257 dust212.velocity *= 0.2f;
32258 }
32259 return;
32260 }
32262 {
32264 {
32266 }
32269 {
32271 {
32277 Main.dust[
num378].scale = (float)Main.rand.Next(70, 110) * 0.013f;
32280 dust212.velocity *= 0.2f;
32281 }
32282 }
32283 return;
32284 }
32286 {
32289 {
32291 {
32297 Main.dust[
num380].scale = (float)Main.rand.Next(70, 110) * 0.013f;
32300 dust212.velocity *= 0.2f;
32301 }
32302 }
32303 return;
32304 }
32307 {
32309 {
32317 Main.dust[
num382].scale = (float)Main.rand.Next(70, 110) * 0.013f;
32320 dust212.velocity *= 0.2f;
32321 }
32322 }
32323 }
32325 {
32326 if (this.
ai[0] == -2f)
32327 {
32330 return;
32331 }
32332 if (this.
ai[0] == -3f)
32333 {
32335 return;
32336 }
32338 {
32341 }
32342 if (this.
ai[0] >= 0f)
32343 {
32345 {
32347 }
32349 {
32351 }
32355 if (this.
ai[0] >= 18f)
32356 {
32357 velocity.Y += 0.28f;
32358 velocity.X *= 0.99f;
32359 }
32360 if ((double)velocity.Y > 15.9)
32361 {
32362 velocity.Y = 15.9f;
32363 }
32364 if (!(this.
ai[0] > 2f))
32365 {
32366 return;
32367 }
32369 if (this.
ai[0] == 3f)
32370 {
32372 {
32376 dust212.velocity *= 0.5f;
32379 dust212.velocity +=
velocity * 0.1f;
32380 }
32382 {
32384 Main.dust[
num389].noGravity =
true;
32387 dust212.velocity *= 3
f;
32390 dust212.velocity +=
velocity * 0.2f;
32394 dust212.velocity *= 2
f;
32397 dust212.velocity +=
velocity * 0.3f;
32398 }
32400 {
32401 Vector2
val7 =
new Vector2(
base.position.X - 10
f,
base.position.Y - 10
f);
32402 val4 =
default(Vector2);
32406 gore8.position +=
velocity * 1.25f;
32407 Main.gore[
num391].scale = 1.5f;
32410 gore8.velocity +=
velocity * 0.5f;
32413 gore8.velocity *= 0.02f;
32414 }
32415 }
32416 }
32417 else if (this.
ai[0] == -1f)
32418 {
32420 velocity.X *= 0.95f;
32421 velocity.Y += 0.2f;
32422 }
32423 }
32425 {
32427 {
32429 {
32432 }
32436 {
32438 }
32440 {
32442 }
32444 {
32446 }
32448 {
32450 }
32452 {
32454 }
32456 {
32458 Main.dust[
num393].noGravity =
true;
32461 dust212.velocity *= 0.5f;
32464 dust212.velocity +=
velocity * 0.1f;
32465 }
32466 return;
32467 }
32469 {
32471 {
32473 Main.dust[
num395].noGravity =
true;
32476 dust212.velocity *= 0.5f;
32479 dust212.velocity +=
velocity * 0.1f;
32480 }
32481 return;
32482 }
32484 {
32487 }
32490 {
32492 }
32494 if (this.
ai[0] > 540f)
32495 {
32497 }
32499 {
32502 }
32504 {
32506 }
32508 {
32509 float num398 = Main.rand.Next(-10, 11);
32510 float num400 = Main.rand.Next(-10, 11);
32511 float num401 = Main.rand.Next(3, 9);
32517 Main.dust[
num403].noGravity =
true;
32518 Main.dust[
num403].position.X =
base.Center.X;
32519 Main.dust[
num403].position.Y =
base.Center.Y;
32520 Main.dust[
num403].position.X += Main.rand.Next(-10, 11);
32521 Main.dust[
num403].position.Y += Main.rand.Next(-10, 11);
32524 }
32525 }
32527 {
32529 {
32532 {
32534 {
32536 Main.dust[
num405].noGravity =
true;
32539 dust212.velocity *= 0
f;
32540 }
32541 }
32542 }
32543 else
32544 {
32546 {
32549 }
32551 {
32553 Main.dust[
num407].noGravity =
true;
32556 dust212.velocity *= 0
f;
32557 }
32558 }
32565 {
32567 {
32569 {
32574 {
32580 }
32581 }
32582 }
32583 }
32584 else
32585 {
32588 {
32589 if (Main.player[
num418].active && !Main.player[
num418].dead)
32590 {
32591 float num419 = Main.player[
num418].position.X + (float)(Main.player[
num418].width / 2);
32592 float num420 = Main.player[
num418].position.Y + (float)(Main.player[
num418].height / 2);
32595 {
32601 }
32602 }
32603 }
32604 }
32606 {
32609 {
32611 }
32622 {
32623 velocity.X = (velocity.X * 20
f +
num424) / 21
f;
32624 velocity.Y = (velocity.Y * 20
f +
num425) / 21
f;
32625 }
32626 else
32627 {
32628 velocity.X = (velocity.X * 100
f +
num424) / 101
f;
32629 velocity.Y = (velocity.Y * 100
f +
num425) / 101
f;
32630 }
32631 }
32632 }
32634 {
32643 if (
num432 < 50
f &&
base.position.X < Main.player[
num428].position.X + (
float)Main.player[
num428].width && base.position.X + (float)
width > Main.player[
num428].position.X &&
base.position.Y < Main.player[
num428].position.Y + (
float)Main.player[
num428].height && base.position.Y + (float)
height > Main.player[
num428].position.Y)
32644 {
32645 if (
owner == Main.myPlayer && !Main.player[Main.myPlayer].moonLeech)
32646 {
32651 player13.statLife +=
num435;
32652 if (Main.player[
num428].statLife > Main.player[
num428].statLifeMax2)
32653 {
32654 Main.player[
num428].statLife = Main.player[
num428].statLifeMax2;
32655 }
32656 NetMessage.SendData(66, -1, -1,
null,
num428,
num435);
32657 }
32659 }
32663 velocity.X = (velocity.X * 15
f +
num430) / 16
f;
32664 velocity.Y = (velocity.Y * 15
f +
num431) / 16
f;
32666 {
32668 {
32672 Main.dust[
num439].noGravity =
true;
32675 dust212.velocity *= 0
f;
32678 }
32679 }
32680 else
32681 {
32683 {
32687 Main.dust[
num443].noGravity =
true;
32690 dust212.velocity *= 0
f;
32693 }
32694 }
32695 }
32697 {
32699 {
32706 {
32708 {
32712 dust212.velocity *= 2
f;
32713 Main.dust[
num447].noGravity =
true;
32716 dust212.scale *= 1.15f;
32717 }
32718 }
32720 {
32724 {
32726 Main.dust[
num449].scale = (float)Main.rand.Next(1, 10) * 0.1f;
32727 Main.dust[
num449].noGravity =
true;
32728 Main.dust[
num449].fadeIn = 1.5f;
32731 dust212.velocity *= 0.75f;
32732 }
32733 }
32735 {
32742 {
32746 dust212.velocity *= 2
f;
32747 Main.dust[
num453].noGravity =
true;
32750 dust212.scale *= 0.5f;
32751 }
32752 }
32753 }
32755 velocity.Y += 0.2f;
32757 {
32759 }
32767 {
32772 {
32778 }
32779 }
32781 {
32783 {
32784 if (Main.npc[
num462].CanBeChasedBy(
this))
32785 {
32790 {
32796 }
32797 }
32798 }
32799 }
32801 {
32802 if (
type == 966 && this.
ai[1] != (
float)num458)
32803 {
32804 this.
ai[1] = num458;
32806 }
32813 {
32815 {
32817 }
32819 {
32822 {
32824 }
32825 else
32826 {
32828 }
32832 {
32834 }
32835 else if (
type == 377)
32836 {
32838 }
32840 {
32842 }
32844 {
32846 if (this.
ai[0] <= 0f)
32847 {
32849 }
32850 }
32851 }
32852 }
32853 if (this.
ai[0] <= 0f)
32854 {
32857 {
32859 }
32861 this.
ai[0] = num472;
32863 if (Main.myPlayer ==
owner)
32864 {
32868 {
32871 }
32873 {
32876 }
32878 {
32881 }
32885 {
32886 vector109.Y -= 16
f;
32887 }
32888 else
32889 {
32891 {
32892 case 0:
32893 vector109.Y += 12
f;
32895 break;
32896 case 1:
32899 break;
32900 case 2:
32903 break;
32904 case 3:
32907 break;
32908 case 4:
32909 vector109.Y -= 14
f;
32911 break;
32912 }
32913 }
32915 {
32916 vector109.X += 10
f;
32917 }
32927 }
32928 }
32929 }
32930 else
32931 {
32932 if (
type == 966 && this.
ai[1] != -1f)
32933 {
32936 }
32938 {
32940 }
32941 }
32942 if (this.
ai[0] > 0f)
32943 {
32945 }
32946 }
32948 {
32950 {
32951 if (Main.player[Main.myPlayer].dead)
32952 {
32953 Main.player[Main.myPlayer].raven = false;
32954 }
32955 if (Main.player[Main.myPlayer].raven)
32956 {
32958 }
32959 }
32961 {
32963 {
32964 if (
base.position.X < Main.projectile[
num482].position.X)
32965 {
32966 velocity.X -= 0.05f;
32967 }
32968 else
32969 {
32970 velocity.X += 0.05f;
32971 }
32972 if (
base.position.Y < Main.projectile[
num482].position.Y)
32973 {
32974 velocity.Y -= 0.05f;
32975 }
32976 else
32977 {
32978 velocity.Y += 0.05f;
32979 }
32980 }
32981 }
32988 {
32990 }
32992 {
32994 }
32995 if (this.
ai[0] == 0f)
32996 {
33000 {
33005 {
33010 }
33011 }
33013 {
33015 {
33016 if (Main.npc[
num491].CanBeChasedBy(
this))
33017 {
33022 {
33027 }
33028 }
33029 }
33030 }
33031 }
33032 else
33033 {
33035 }
33037 {
33040 if (this.
ai[0] == 1f)
33041 {
33043 }
33047 float num497 = Main.player[
owner].Center.Y - vector110.Y - 60
f;
33051 {
33053 }
33055 {
33056 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
33057 base.position.Y = Main.player[
owner].Center.Y - (float)(
width / 2);
33058 }
33060 {
33062 if (this.
ai[0] == 1f)
33063 {
33065 }
33066 }
33068 {
33072 velocity.X = (velocity.X * 20
f +
num496) / 21
f;
33073 velocity.Y = (velocity.Y * 20
f +
num497) / 21
f;
33074 }
33075 else
33076 {
33078 {
33079 velocity.X = -0.15f;
33080 velocity.Y = -0.05f;
33081 }
33083 }
33088 {
33091 }
33093 {
33095 }
33097 {
33099 }
33100 return;
33101 }
33102 if (this.
ai[1] == -1f)
33103 {
33105 }
33106 if (this.
ai[1] > 0f)
33107 {
33109 }
33110 if (this.
ai[1] == 0f)
33111 {
33121 {
33123 }
33127 velocity.X = (velocity.X * 14
f +
num502) / 15
f;
33128 velocity.Y = (velocity.Y * 14
f +
num503) / 15
f;
33129 }
33130 else
33131 {
33134 {
33136 }
33137 }
33141 {
33144 }
33146 {
33148 }
33150 {
33152 }
33154 {
33156 }
33157 }
33159 {
33162 {
33166 {
33168 }
33169 }
33171 {
33174 }
33175 else
33176 {
33179 }
33180 if (this.
ai[0] >= 0f && this.
ai[0] < 200f)
33181 {
33185 {
33195 velocity.X = (velocity.X * 14
f +
num508) / 15
f;
33196 velocity.Y = (velocity.Y * 14
f +
num509) / 15
f;
33197 }
33198 else
33199 {
33202 {
33205 {
33210 {
33213 }
33214 }
33215 }
33216 }
33221 dust212.velocity *= 0.5f;
33224 dust212.velocity +=
velocity * 0.5f;
33225 Main.dust[
num517].noGravity =
true;
33226 Main.dust[
num517].noLight =
true;
33227 Main.dust[
num517].scale = 1.4f;
33228 }
33229 else
33230 {
33232 }
33233 }
33235 {
33237 {
33241 }
33243 {
33245 }
33247 {
33249 }
33250 else
33251 {
33253 }
33255 }
33257 {
33259 if (this.
ai[0] > 30f)
33260 {
33262 velocity.Y += 0.25f;
33264 {
33266 }
33267 velocity.X *= 0.995f;
33268 }
33272 {
33274 }
33275 if (
owner == Main.myPlayer)
33276 {
33278 {
33279 localAI[1] = Main.rand.Next(7);
33280 }
33284 {
33286 }
33288 {
33291 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y, 0
f, 0
f, 344, (
int)((
float)
damage * 0.7f),
knockBack * 0.55f,
owner, 0
f, Main.rand.Next(3));
33292 }
33293 }
33294 }
33296 {
33299 {
33301 }
33302 if (this.
ai[0] == 0f)
33303 {
33306 if (this.
ai[1] > 30f)
33307 {
33308 velocity.Y += 0.1f;
33309 }
33311 {
33313 }
33314 }
33315 if (this.
ai[0] == 1f)
33316 {
33318 velocity.Y += 0.1f;
33320 {
33322 }
33323 velocity.X *= 0.99f;
33324 }
33326 }
33328 {
33330 if (this.
ai[1] >= 60f)
33331 {
33334 if (Main.myPlayer ==
owner && (
num519 == -1 || !Main.npc[
num519].CanBeChasedBy(
this)))
33335 {
33337 int[] array = new int[200];
33340 {
33341 if (Main.npc[
num523].CanBeChasedBy(
this))
33342 {
33345 {
33348 }
33349 }
33350 }
33352 {
33354 return;
33355 }
33357 this.
ai[0] = num519;
33359 }
33361 {
33375 }
33376 }
33378 {
33382 Main.dust[
num535].noGravity =
true;
33385 dust212.velocity *= 0
f;
33388 }
33389 }
33391 {
33394 {
33398 }
33399 if (this.
ai[0] > 3f)
33400 {
33403 {
33405 }
33406 if (
owner == Main.myPlayer)
33407 {
33410 Rectangle
value20 =
default(Rectangle);
33412 {
33413 if (Main.npc[
num537].active && !Main.npc[
num537].dontTakeDamage && Main.npc[
num537].lifeMax > 1)
33414 {
33417 {
33420 }
33421 }
33422 }
33423 Rectangle
value21 =
default(Rectangle);
33425 {
33427 {
33430 {
33433 }
33434 }
33435 }
33436 }
33437 this.
ai[0] += this.
ai[1];
33438 if (this.
ai[0] > 30f)
33439 {
33440 velocity.Y += 0.1f;
33441 }
33443 {
33445 {
33447 {
33454 if (Main.rand.Next(2) == 0)
33455 {
33458 dust212.alpha += 25;
33459 }
33460 if (Main.rand.Next(2) == 0)
33461 {
33464 dust212.alpha += 25;
33465 }
33466 if (Main.rand.Next(2) == 0)
33467 {
33470 dust212.alpha += 25;
33471 }
33472 Main.dust[
num545].noGravity =
true;
33475 dust212.velocity *= 0.3f;
33478 dust212.velocity +=
velocity * 0.5f;
33484 dust212.velocity *= 0.2f;
33485 }
33486 if (Main.rand.Next(4) == 0)
33487 {
33492 dust212.velocity *= 0.5f;
33495 dust212.velocity +=
velocity * 0.5f;
33496 }
33497 }
33498 }
33500 {
33501 return;
33502 }
33507 {
33513 if (Main.rand.Next(2) == 0)
33514 {
33517 dust212.alpha += 25;
33518 }
33519 if (Main.rand.Next(2) == 0)
33520 {
33523 dust212.alpha += 25;
33524 }
33525 if (Main.rand.Next(2) == 0)
33526 {
33529 dust212.alpha += 25;
33530 }
33531 Main.dust[
num551].noGravity =
true;
33534 dust212.velocity *= 0.3f;
33537 dust212.velocity +=
velocity * 0.5f;
33543 dust212.velocity *= 0.2f;
33544 }
33545 if (Main.rand.Next(4) == 0)
33546 {
33551 dust212.velocity *= 0.5f;
33554 dust212.velocity +=
velocity * 0.5f;
33555 }
33556 }
33557 else
33558 {
33560 }
33561 }
33563 {
33565 }
33567 {
33569 }
33571 {
33572 if (!Main.player[
owner].active)
33573 {
33575 return;
33576 }
33581 {
33583 if (
nPC14.CanBeChasedBy(
this))
33584 {
33587 {
33591 }
33592 }
33593 }
33595 {
33596 velocity.X *= 0.95f;
33597 }
33598 else
33599 {
33603 {
33606 {
33608 }
33610 {
33612 }
33613 }
33614 else
33615 {
33618 }
33621 {
33623 }
33625 {
33627 }
33628 }
33632 {
33634 }
33635 else
33636 {
33638 {
33640 }
33642 {
33644 }
33646 {
33648 }
33650 {
33652 }
33653 else
33654 {
33656 }
33657 }
33659 {
33661 }
33663 velocity.Y += 0.2f;
33665 {
33667 }
33668 }
33670 {
33677 {
33681 }
33683 {
33685 }
33688 {
33691 }
33693 {
33695 }
33697 {
33699 base.position.X +=
width / 2;
33700 base.position.Y +=
height / 2;
33704 base.position.X -=
width / 2;
33705 base.position.Y -=
height / 2;
33707 }
33708 if (this.
ai[1] != -1f)
33709 {
33713 }
33715 {
33718 {
33720 }
33722 {
33724 }
33725 }
33726 else
33727 {
33730 {
33732 }
33733 }
33734 if (this.
ai[0] > 0f)
33735 {
33737 }
33738 if (this.
ai[0] == 1f && this.
ai[1] > 0f &&
owner == Main.myPlayer)
33739 {
33746 NewProjectile(
GetProjectileSource_FromThis(),
center15.X,
center15.Y,
velocity.X,
velocity.Y,
type,
damage,
knockBack,
owner, 10
f,
this.ai[1] - 1
f);
33749 {
33751 }
33752 if ((
int)this.
ai[1] % num568 == 0 && this.
ai[1] != 0f)
33753 {
33756 {
33758 }
33761 Main.npc[
num570].netUpdate =
true;
33763 {
33765 Main.npc[
num570].ai[3] = -1.5f;
33766 }
33767 }
33768 }
33769 if (this.
ai[0] <= 0f)
33770 {
33774 {
33776 }
33782 }
33783 }
33785 {
33786 if (this.
ai[1] > 0f)
33787 {
33789 if (num574 < 255)
33790 {
33793 {
33796 {
33800 val4 =
default(Vector2);
33802 Vector2
vector115 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - (float)
Math.PI / 2
f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
33804 Main.dust[
num578].noGravity =
true;
33805 Main.dust[
num578].noLight =
true;
33808 dust212.velocity /= 4
f;
33812 }
33815 {
33817 }
33820 }
33823 if (this.
ai[2] == 1f)
33824 {
33826 }
33830 {
33832 }
33833 }
33834 }
33835 else
33836 {
33846 {
33849 {
33851 }
33854 }
33855 }
33857 {
33858 base.position.Y -= 16
f;
33860 }
33861 }
33863 {
33870 {
33875 if (Main.player[
owner].dead)
33876 {
33877 Main.player[
owner].twinsMinion =
false;
33878 }
33879 if (Main.player[
owner].twinsMinion)
33880 {
33882 }
33883 }
33885 {
33890 if (Main.player[
owner].dead)
33891 {
33892 Main.player[
owner].DeadlySphereMinion =
false;
33893 }
33894 if (Main.player[
owner].DeadlySphereMinion)
33895 {
33897 }
33899 }
33902 {
33905 {
33907 }
33909 {
33910 if (
base.position.X < Main.projectile[
num589].position.X)
33911 {
33913 }
33914 else
33915 {
33917 }
33918 if (
base.position.Y < Main.projectile[
num589].position.Y)
33919 {
33921 }
33922 else
33923 {
33925 }
33926 }
33927 }
33929 {
33930 if ((
int)this.
ai[0] % 3 != 2)
33931 {
33932 Lighting.AddLight(
base.Center, 0.8f, 0.3f, 0.1f);
33933 }
33934 else
33935 {
33936 Lighting.AddLight(
base.Center, 0.3f, 0.5f, 0.7f);
33937 }
33938 }
33940 if (this.
ai[0] == 2f &&
type == 388)
33941 {
33947 {
33950 }
33952 {
33954 }
33955 if (this.
ai[1] > 40f)
33956 {
33962 }
33963 else
33964 {
33966 }
33967 }
33968 if (
type == 533 && this.
ai[0] >= 3f && this.
ai[0] <= 5f)
33969 {
33974 int num591 = (int)this.
ai[1] / num590 + (
int)(this.
ai[0] - 3f) * 8;
33976 {
33978 }
33980 {
33982 }
33984 {
33986 }
33988 {
33990 }
33992 {
33994 }
33996 {
33998 }
34000 {
34002 }
34004 {
34006 }
34007 else
34008 {
34010 }
34011 if (this.
ai[1] > (
float)(num590 * 8))
34012 {
34015 }
34016 }
34017 if (
type == 533 && this.
ai[0] >= 6f && this.
ai[0] <= 8f)
34018 {
34021 if (this.
ai[0] == 7f)
34022 {
34024 }
34025 else
34026 {
34028 }
34030 switch ((
int)this.
ai[0])
34031 {
34032 case 6:
34034 num592 = 40;
34035 break;
34036 case 7:
34039 break;
34040 case 8:
34043 break;
34044 }
34045 if (this.ai[1] > (
float)
num592)
34046 {
34053 }
34054 else
34055 {
34057 }
34058 if (this.ai[0] == 8
f)
34059 {
34061 {
34062 int num594 = Utils.SelectRandom<
int>(Main.rand, 226, 228, 75);
34065 Vector2
one = Vector2.One;
34067 val4 =
default(Vector2);
34070 val4 =
default(Vector2);
34072 dust6.position = base.Center +
vector116 * 10
f;
34074 dust6.scale = 0.6f + Main.rand.NextFloat() * 0.5f;
34075 dust6.noGravity = true;
34076 }
34077 }
34078 }
34080 {
34081 return;
34082 }
34084 Vector2
zero = Vector2.Zero;
34086 if (this.ai[0] != 1
f &&
flag19)
34087 {
34089 }
34090 if (
type == 533 && this.ai[0] < 9
f)
34091 {
34093 }
34095 {
34097 }
34100 {
34104 {
34108 }
34109 }
34111 {
34113 {
34115 if (
nPC15.CanBeChasedBy(
this))
34116 {
34119 {
34124 }
34125 }
34126 }
34127 }
34130 {
34132 }
34135 {
34137 {
34139 }
34140 if (
type == 533 && this.ai[0] < 9
f)
34141 {
34142 this.ai[0] += 3 * (3 - (int)(this.ai[0] / 3
f));
34143 }
34146 }
34148 {
34153 {
34156 {
34158 }
34161 }
34162 else
34163 {
34167 }
34168 }
34169 else
34170 {
34173 {
34175 }
34177 {
34179 }
34183 {
34185 }
34187 {
34189 }
34195 {
34197 }
34199 {
34203 {
34206 }
34208 {
34210 }
34211 }
34213 {
34216 }
34218 {
34220 {
34222 }
34224 {
34226 }
34228 }
34230 {
34231 base.position.X = Main.player[
owner].Center.X - (float)(
width / 2);
34232 base.position.Y = Main.player[
owner].Center.Y - (float)(
height / 2);
34234 }
34236 {
34241 }
34243 {
34244 velocity.X = -0.15f;
34245 velocity.Y = -0.05f;
34246 }
34248 {
34250 }
34251 }
34253 {
34255 }
34257 {
34258 if (this.ai[0] != 1
f &&
flag22)
34259 {
34261 }
34262 else
34263 {
34265 }
34266 }
34267 if (
type == 533 && (this.ai[0] < 3
f || this.ai[0] >= 9
f))
34268 {
34270 }
34272 {
34275 {
34278 }
34280 {
34282 }
34283 }
34284 else if (
type == 533)
34285 {
34286 if (this.ai[0] < 3
f || this.ai[0] >= 9
f)
34287 {
34290 {
34292 }
34295 switch ((int)this.ai[0])
34296 {
34297 case 0:
34298 case 9:
34300 break;
34301 case 1:
34302 case 10:
34305 break;
34306 case 2:
34307 case 11:
34310 {
34312 }
34314 break;
34315 }
34316 }
34317 if (this.ai[0] == 2
f && Main.rand.Next(2) == 0)
34318 {
34320 {
34321 if (Main.rand.Next(2) != 0)
34322 {
34323 int num612 = Utils.SelectRandom<
int>(Main.rand, 226, 228, 75);
34326 Vector2
one2 = Vector2.One;
34328 val4 =
default(Vector2);
34331 val4 =
default(Vector2);
34333 dust7.position = base.Center +
vector120 * 10
f;
34335 dust7.scale = 0.3f + Main.rand.NextFloat() * 0.5f;
34336 dust7.noGravity = true;
34337 dust7.customData = this;
34338 dust7.noLight = true;
34339 }
34340 }
34341 }
34342 }
34343 if (this.ai[1] > 0
f &&
flag19)
34344 {
34345 this.ai[1] += Main.rand.Next(1, 4);
34346 }
34347 if (this.ai[1] > 90
f &&
type == 387)
34348 {
34351 }
34352 if (this.ai[1] > 40
f &&
type == 388)
34353 {
34356 }
34357 if (this.ai[1] > 0
f &&
type == 533)
34358 {
34359 this.ai[1]++;
34361 if (this.ai[1] > (
float)
num614)
34362 {
34365 }
34366 }
34367 if (this.ai[0] == 0
f &&
flag19)
34368 {
34370 {
34373 if (
flag22 && this.ai[1] == 0
f)
34374 {
34375 this.ai[1]++;
34377 {
34382 Main.projectile[
num617].timeLeft = 300;
34384 }
34385 }
34386 }
34388 {
34389 this.ai[1]++;
34390 if (Main.myPlayer ==
owner)
34391 {
34399 }
34400 }
34401 }
34402 else
34403 {
34404 if (
type != 533 || !(this.ai[0] < 9
f))
34405 {
34406 return;
34407 }
34411 {
34412 return;
34413 }
34414 this.ai[1]++;
34415 if (Main.myPlayer !=
owner)
34416 {
34417 return;
34418 }
34420 {
34422 if (this.ai[0] == 6
f)
34423 {
34425 }
34427 }
34428 else
34429 {
34432 v5 =
v5.SafeNormalize(Vector2.Zero);
34433 float num620 = ((this.ai[0] == 8
f) ? 12
f : 10
f);
34437 }
34438 }
34439 }
34441 {
34443 }
34445 {
34450 if (this.ai[0] >= 3
f)
34451 {
34454 {
34456 }
34457 }
34458 if (this.ai[0] >= 15
f)
34459 {
34460 velocity.Y += 0.2f;
34462 {
34464 }
34465 velocity.X *= 0.99f;
34466 }
34468 {
34470 {
34475 {
34476 spinningpoint10.X = -4
f;
34477 }
34480 val4 =
default(Vector2);
34483 {
34485 Main.dust[
num624].scale = 1.5f;
34486 Main.dust[
num624].noGravity =
true;
34491 val4 =
default(Vector2);
34493 }
34494 }
34496 {
34499 {
34504 val4 =
default(Vector2);
34507 Main.dust[
num627].scale = 0.8f - Main.rand.NextFloat() * 0.2f;
34512 val4 =
default(Vector2);
34514 Main.dust[
num627].color = Utils.SelectRandom(Main.rand, (Color[])(object)
new Color[2]
34515 {
34516 new Color(255, 255, 255, 110),
34517 new Color(245, 200, 30, 110)
34518 });
34519 }
34520 }
34521 }
34524 {
34527 base.position.X +=
width / 2;
34528 base.position.Y +=
height / 2;
34531 base.position.X -=
width / 2;
34532 base.position.Y -=
height / 2;
34534 }
34536 {
34538 }
34539 }
34541 {
34544 if (Main.player[
owner].dead)
34545 {
34547 return;
34548 }
34549 Main.player[
owner].SetDummyItemTime(10);
34551 {
34552 Main.player[
owner].ChangeDir(1);
34554 }
34555 else
34556 {
34557 Main.player[
owner].ChangeDir(-1);
34559 }
34562 if (this.ai[0] == 0
f && ((Vector2)(
ref vector122)).Length() > 400
f)
34563 {
34565 }
34566 if (this.ai[0] == 1
f || this.ai[0] == 2
f)
34567 {
34570 {
34572 return;
34573 }
34575 {
34577 }
34580 if (this.ai[0] == 2
f)
34581 {
34583 }
34586 {
34588 return;
34589 }
34590 }
34591 this.ai[1]++;
34592 if (this.ai[1] > 5
f)
34593 {
34595 }
34596 if ((
int)this.ai[1] % 4 == 0 &&
owner == Main.myPlayer)
34597 {
34602 double radians13 = (Main.rand.NextDouble() - 0.5) * 1.5707963705062866;
34603 val4 =
default(Vector2);
34606 }
34607 }
34609 {
34610 if (this.ai[0] == 0
f)
34611 {
34615 {
34617 val4 = nPC16.Center -
base.Center;
34620 {
34623 }
34624 }
34625 this.ai[0] =
num631 + 1;
34626 if (this.ai[0] == 0
f)
34627 {
34629 }
34630 if (this.ai[0] > 0
f)
34631 {
34632 float num636 = (float)Main.rand.Next(35, 75) / 30
f;
34633 velocity = (
velocity * 20
f + Vector2.Normalize(Main.npc[(
int)this.ai[0] - 1].Center - base.Center +
new Vector2((
float)Main.rand.Next(-100, 101), (
float)Main.rand.Next(-100, 101))) *
num636) / 21
f;
34635 }
34636 }
34637 else if (this.ai[0] > 0
f)
34638 {
34639 Vector2
vector124 = Vector2.Normalize(Main.npc[(
int)this.ai[0] - 1].Center -
base.Center);
34641 }
34642 else
34643 {
34644 this.ai[0]++;
34647 {
34649 }
34651 }
34652 if (this.ai[1] == 0
f)
34653 {
34654 this.ai[1] = (float)Main.rand.Next(80, 121) / 100
f;
34656 }
34657 scale = this.ai[1];
34658 }
34660 {
34662 if (
localAI[1] > 10
f && Main.rand.Next(3) == 0)
34663 {
34666 {
34670 val4 =
default(Vector2);
34672 Vector2
vector125 = ((float)(Main.rand.NextDouble() * 3.1415927410125732) - (float)
Math.PI / 2
f).ToRotationVector2() * (float)Main.rand.Next(3, 8);
34674 Main.dust[
num639].noGravity =
true;
34675 Main.dust[
num639].noLight =
true;
34678 dust212.velocity /= 4
f;
34682 }
34685 {
34687 }
34690 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.1f, 0.4f, 0.6f);
34691 }
34696 {
34698 }
34699 if (this.ai[0] == 0
f &&
localAI[0] == 0
f)
34700 {
34702 {
34704 if (
nPC17.CanBeChasedBy(
this) && (this.ai[0] == 0
f || this.ai[0] == (float)(
num642 + 1)))
34705 {
34709 {
34713 }
34714 }
34715 }
34717 {
34718 this.ai[0] =
num640 + 1;
34720 }
34722 }
34723 if (
localAI[0] == 0
f && this.ai[0] == 0
f)
34724 {
34726 }
34728 if (this.ai[0] != 0
f)
34729 {
34730 int num645 = (int)(this.ai[0] - 1
f);
34732 {
34737 {
34740 }
34741 }
34742 else
34743 {
34747 }
34748 }
34750 {
34756 {
34757 num651 -= Math.PI * 2.0;
34758 }
34760 {
34761 num651 += Math.PI * 2.0;
34762 }
34765 val4 =
default(Vector2);
34767 }
34771 }
34773 {
34776 {
34779 {
34781 }
34782 }
34784 if (this.ai[1] == 0
f)
34785 {
34786 this.ai[1] = (float)Main.rand.Next(60, 121) / 100
f;
34788 }
34789 scale = this.ai[1];
34790 base.position =
base.Center;
34795 base.position -=
new Vector2((
float)(
width / 2), (
float)(
height / 2));
34796 }
34798 {
34799 int num656 = (int)this.ai[0];
34800 int num657 = (int)this.ai[1];
34802 if (
tile2 ==
null || !
tile2.active() || tile2.type != 338)
34803 {
34805 return;
34806 }
34810 {
34812 }
34814 {
34817 {
34821 double radians16 = (Main.rand.NextDouble() - 0.5) * 1.5707963705062866;
34822 val4 =
default(Vector2);
34826 dust8.scale = 1
f + (float)Main.rand.NextDouble() * 0.3f;
34829 dust212.velocity *= 0.5f;
34830 if (
dust8.velocity.Y > 0
f)
34831 {
34832 dust8.velocity.Y *= -1
f;
34833 }
34836 dust212.position -=
new Vector2((
float)(2 + Main.rand.Next(-2, 3)), 0
f);
34840 dust8.scale = 0.6f;
34841 dust8.fadeIn = dust8.scale + 0.2f;
34842 dust8.velocity.Y *= 2
f;
34843 }
34844 }
34846 {
34849 {
34853 double radians17 = (Main.rand.NextDouble() - 0.5) * 1.5707963705062866;
34854 val4 =
default(Vector2);
34857 if (Main.rand.Next(5) == 0)
34858 {
34860 }
34863 dust9.scale = 1
f + (float)Main.rand.NextDouble() * 0.3f;
34866 dust212.velocity *= 0.5f;
34867 if (
dust9.velocity.Y > 0
f)
34868 {
34869 dust9.velocity.Y *= -1
f;
34870 }
34873 dust212.position -=
new Vector2((
float)(2 + Main.rand.Next(-2, 3)), 0
f);
34877 dust9.velocity.X *= 0.5f;
34878 dust9.scale = 0.6f;
34879 dust9.fadeIn = dust9.scale + 0.2f;
34880 dust9.velocity.Y *= 2
f;
34881 }
34882 }
34884 {
34887 {
34891 double radians18 = (Main.rand.NextDouble() - 0.5) * 0.7853981852531433;
34892 val4 =
default(Vector2);
34896 dust10.scale = 1
f + (float)Main.rand.NextDouble() * 0.3f;
34899 dust212.velocity *= 0.1f;
34901 {
34902 dust10.velocity.Y *= -1
f;
34903 }
34906 dust212.position -=
new Vector2((
float)(2 + Main.rand.Next(-2, 3)), 0
f);
34910 dust10.scale = 0.6f;
34911 dust10.fadeIn = dust10.scale + 0.2f;
34912 dust10.velocity.Y *= 2.5f;
34913 }
34915 {
34916 float num668 = 0.85f + (float)Main.rand.NextDouble() * 0.2f;
34919 {
34923 dust11.scale = 0.7f + (float)Main.rand.NextDouble() * 0.3f;
34926 dust212.velocity *= 0
f;
34928 {
34929 dust11.velocity.Y *= -1
f;
34930 }
34933 dust212.position -=
new Vector2((
float)(2 + Main.rand.Next(-2, 3)), 0
f);
34937 dust11.scale = 0.6f;
34938 dust11.fadeIn = dust11.scale + 0.2f;
34939 dust11.velocity.Y *= 2
f;
34940 }
34941 }
34942 }
34944 {
34945 return;
34946 }
34949 {
34953 double radians19 = (Main.rand.NextDouble() - 0.5) * 1.5707963705062866;
34954 val4 =
default(Vector2);
34958 dust159.scale = 1
f + (float)Main.rand.NextDouble() * 0.3f;
34961 dust212.velocity *= 0.5f;
34963 {
34964 dust159.velocity.Y *= -1
f;
34965 }
34968 dust212.position -=
new Vector2((
float)(2 + Main.rand.Next(-2, 3)), 0
f);
34972 dust159.scale = 0.6f;
34973 dust159.fadeIn = dust159.scale + 0.2f;
34974 dust159.velocity.Y *= 2
f;
34975 }
34976 }
34978 {
34980 {
34983 if ((
double)
localAI[0] < 0.01)
34984 {
34986 }
34987 }
34988 }
34990 {
34992 }
34994 {
34996 player8.heldProj =
whoAmI;
34998 {
35000 {
35002 return;
35003 }
35004 }
35006 {
35008 return;
35009 }
35010 if (Main.myPlayer ==
owner)
35011 {
35012 base.position.X = Main.screenPosition.X + (float)Main.mouseX;
35013 base.position.Y = Main.screenPosition.Y + (float)Main.mouseY;
35014 if (this.ai[0] !=
base.position.X -
player8.position.X ||
this.ai[1] !=
base.position.Y -
player8.position.Y)
35015 {
35017 }
35018 this.ai[0] = base.position.X -
player8.position.X;
35019 this.ai[1] = base.position.Y -
player8.position.Y;
35022 {
35025 }
35026 return;
35027 }
35028 base.position.X = player8.position.X + this.ai[0];
35029 base.position.Y = player8.position.Y + this.ai[1];
35031 {
35032 if (!
player8.mount.AbilityCharging)
35033 {
35035 }
35036 }
35037 else if (
type == 453 && !
player8.mount.AbilityActive)
35038 {
35040 }
35042 }
35044 {
35047 {
35049 {
35052 }
35054 }
35055 else
35056 {
35058 }
35059 if (this.ai[1] == 1
f)
35060 {
35063 {
35065 }
35067 {
35070 return;
35071 }
35072 }
35073 else
35074 {
35076 {
35078 }
35080 {
35082 }
35083 }
35086 this.ai[0]++;
35087 if (this.ai[0] >
num674)
35088 {
35090 }
35091 Vector2
unitY = Vector2.UnitY;
35093 val4 =
default(Vector2);
35095 float val = 0.75f + vector128.Y * 0.25f;
35096 float val2 = 0.8f - vector128.Y * 0.2f;
35098 base.position +=
new Vector2((
float)
width, (
float)
height) / 2
f;
35100 base.position -=
new Vector2((
float)
width, (
float)
height) / 2
f;
35103 {
35107 {
35109 }
35110 }
35112 {
35117 Main.dust[
num681].noGravity =
true;
35120 dust212.velocity *= 2
f;
35121 Main.dust[
num681].position = ((float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f)).ToRotationVector2() * (
num679 +
num680 * (float)Main.rand.NextDouble() *
num678) +
base.Center;
35122 Main.dust[
num681].velocity = Main.dust[
num681].velocity / 2
f + Vector2.Normalize(Main.dust[
num681].position -
base.Center);
35123 if (Main.rand.Next(2) == 0)
35124 {
35126 Main.dust[
num681].noGravity =
true;
35129 dust212.velocity *= 1.2f;
35130 Main.dust[
num681].position = ((float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f)).ToRotationVector2() * (
num679 +
num680 * (float)Main.rand.NextDouble() *
num678) +
base.Center;
35131 Main.dust[
num681].velocity = Main.dust[
num681].velocity / 2
f + Vector2.Normalize(Main.dust[
num681].position -
base.Center);
35132 }
35133 if (Main.rand.Next(4) == 0)
35134 {
35136 Main.dust[
num681].noGravity =
true;
35139 dust212.velocity *= 1.2f;
35140 Main.dust[
num681].position = ((float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f)).ToRotationVector2() * (
num679 +
num680 * (float)Main.rand.NextDouble() *
num678) +
base.Center;
35141 Main.dust[
num681].velocity = Main.dust[
num681].velocity / 2
f + Vector2.Normalize(Main.dust[
num681].position -
base.Center);
35142 }
35143 }
35144 }
35146 {
35148 {
35150 }
35152 {
35154 }
35155 Vector2
v7 = this.ai[0].ToRotationVector2();
35160 {
35161 num684 -= Math.PI * 2.0;
35162 }
35164 {
35165 num684 += Math.PI * 2.0;
35166 }
35169 val4 =
default(Vector2);
35174 {
35176 }
35177 }
35179 {
35181 int num685 = (int)this.ai[0] - 1;
35182 if (
type == 447 && (this.ai[0] == 0
f || ((!Main.npc[
num685].active || Main.npc[
num685].type != 392) && (!Main.npc[
num685].active || Main.npc[
num685].type != 395 || !(Main.npc[
num685].ai[3] % 120
f >= 60
f) || Main.npc[
num685].ai[0] != 2
f))))
35183 {
35185 }
35187 {
35189 return;
35190 }
35192 float num686 = nPC18.Center.Y + 46
f;
35195 {
35196 int target =
nPC18.target;
35197 if (
nPC18.type == 392)
35198 {
35199 target = Main.npc[(int)
nPC18.ai[0]].target;
35200 }
35203 {
35205 }
35206 }
35212 {
35214 }
35215 else
35216 {
35218 {
35221 {
35223 break;
35224 }
35225 }
35226 }
35227 base.position.X = nPC18.Center.X - (float)(
width / 2);
35228 base.position.Y =
num686;
35232 {
35235 }
35237 {
35239 {
35241 Main.dust[
num696].noGravity =
true;
35244 dust212.velocity *= 0.5f;
35246 Main.dust[
num696].scale = 2.8f;
35247 }
35248 if (Main.rand.Next(5) == 0)
35249 {
35250 int num697 = Dust.NewDust(
new Vector2(
base.position.X + (
float)(
width / 2) - (
float)(
width / 2 *
Math.Sign(
nPC18.velocity.X)) - 4
f,
base.position.Y + (
float)
height - 16
f), 4, 16, 31, 0
f, 0
f, 100,
default(Color), 1.5f);
35253 dust212.velocity *= 0.5f;
35254 Main.dust[
num697].velocity.X -= nPC18.velocity.X / 2
f;
35256 }
35257 }
35259 {
35262 {
35264 }
35265 }
35266 }
35268 {
35269 if (this.ai[0] == 0
f && this.ai[1] > 0
f)
35270 {
35271 this.ai[1]--;
35272 }
35273 else if (this.ai[0] == 0
f && this.ai[1] == 0
f)
35274 {
35281 {
35284 Vector2
unitY2 = Vector2.UnitY;
35286 val4 =
default(Vector2);
35290 val4 =
default(Vector2);
35292 int num701 = Dust.NewDust(
base.Center, 0, 0, 228);
35293 Main.dust[
num701].scale = 1.5f;
35294 Main.dust[
num701].noGravity =
true;
35297 }
35298 }
35299 else if (this.ai[0] == 1
f)
35300 {
35307 {
35309 return;
35310 }
35312 {
35313 Vector2
v8 = Main.player[(int)this.ai[1]].
Center -
base.Center;
35318 {
35319 num707 -= Math.PI * 2.0;
35320 }
35322 {
35323 num707 += Math.PI * 2.0;
35324 }
35327 val4 =
default(Vector2);
35329 }
35331 {
35333 {
35336 Vector2
unitY3 = Vector2.UnitY;
35338 val4 =
default(Vector2);
35342 val4 =
default(Vector2);
35344 int num709 = Dust.NewDust(
base.Center, 0, 0, 228);
35345 Main.dust[
num709].scale = 1.5f;
35346 Main.dust[
num709].noGravity =
true;
35349 }
35350 }
35351 }
35354 {
35357 {
35359 }
35360 }
35362 {
35363 Vector2
unitY4 = Vector2.UnitY;
35365 val4 =
default(Vector2);
35367 int num712 = Dust.NewDust(
base.Center, 0, 0, 228);
35369 Main.dust[
num712].scale = 1
f;
35370 Main.dust[
num712].noGravity =
true;
35371 }
35373 {
35376 {
35378 break;
35379 }
35380 }
35381 }
35383 {
35385 if (this.ai[0] == 0
f)
35386 {
35390 {
35391 int num715 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
35399 val4 =
default(Vector2);
35405 dust212.velocity *= 0.1f;
35406 if (Main.rand.Next(6) != 0)
35407 {
35408 Main.dust[
num718].noGravity =
true;
35409 }
35410 }
35416 {
35418 {
35422 {
35425 }
35426 }
35428 {
35432 {
35435 }
35436 }
35437 }
35439 }
35440 else if (this.ai[0] >= 1
f && this.ai[0] < (
float)(1 +
num714))
35441 {
35450 {
35452 if (
nPC19.CanBeChasedBy(
this))
35453 {
35457 {
35461 }
35462 }
35463 }
35465 {
35466 if (this.ai[0] == 1
f)
35467 {
35469 return;
35470 }
35472 {
35475 base.position =
vector130 + ((float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f)).ToRotationVector2() * 100
f -
new Vector2((
float)
width, (
float)
height) / 2
f;
35478 }
35479 else
35480 {
35482 }
35483 }
35485 {
35486 base.position += Main.npc[
num724].velocity;
35487 }
35488 if (Main.rand.Next(3) == 0)
35489 {
35490 int num728 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
35499 val4 =
default(Vector2);
35505 dust212.velocity *= 0.1f;
35506 Main.dust[
num731].noGravity =
true;
35507 }
35508 }
35509 else if (this.ai[0] >= (
float)(1 +
num714) && this.ai[0] < (
float)(1 +
num714 * 2))
35510 {
35514 this.ai[1]++;
35515 if (this.ai[1] >= 15
f)
35516 {
35520 {
35522 }
35523 }
35524 else
35525 {
35528 {
35530 }
35532 }
35538 {
35540 if (
nPC2.CanBeChasedBy(
this))
35541 {
35545 {
35549 }
35550 }
35551 }
35553 {
35554 base.position += Main.npc[
num733].velocity;
35555 }
35556 int num737 = Utils.SelectRandom<
int>(Main.rand, 226, 229);
35564 val4 =
default(Vector2);
35570 dust212.velocity *= 0.1f;
35571 Main.dust[
num740].noGravity =
true;
35572 }
35574 Lighting.AddLight((
int)base.Center.X / 16, (int)
base.Center.Y / 16, 0.3f *
num741, 0.4f *
num741, 1
f *
num741);
35575 }
35577 {
35580 {
35582 }
35583 if (this.ai[0] == 0
f)
35584 {
35587 {
35590 this.ai[1] = 0
f - this.ai[1];
35592 }
35596 val4 =
default(Vector2);
35599 velocity.Y -= 0.08f;
35601 {
35602 velocity.Y -= 0.2f;
35603 }
35605 {
35607 }
35608 }
35609 else if (this.ai[0] == 1
f)
35610 {
35613 {
35618 }
35622 val4 =
default(Vector2);
35625 velocity.Y -= 0.08f;
35627 {
35628 velocity.Y -= 0.2f;
35629 }
35631 {
35633 }
35634 }
35635 else if (this.ai[0] == 2
f)
35636 {
35639 {
35641 return;
35642 }
35647 {
35649 }
35652 {
35655 {
35657 }
35658 }
35660 {
35663 {
35665 }
35666 }
35668 {
35671 {
35673 }
35674 }
35676 {
35679 {
35681 }
35682 }
35683 }
35685 {
35686 int num745 = Dust.NewDust(
base.Center - Vector2.One * 5
f, 10, 10, 229, (0
f -
velocity.X) / 3
f, (0
f -
velocity.Y) / 3
f, 150, Color.Transparent, 1.2f);
35687 Main.dust[
num745].noGravity =
true;
35688 }
35690 }
35692 {
35694 {
35696 }
35699 {
35701 }
35704 if (this.ai[0] >= 0
f)
35705 {
35706 this.ai[0]++;
35707 }
35708 if (this.ai[0] == -1
f)
35709 {
35712 }
35713 else if (this.ai[0] < 30
f)
35714 {
35716 }
35717 else
35718 {
35721 {
35724 {
35726 }
35727 }
35728 }
35730 {
35731 return;
35732 }
35734 {
35735 float num748 = (float)Main.rand.NextDouble() * 1
f - 0.5f;
35737 {
35739 }
35741 {
35743 }
35746 val4 =
default(Vector2);
35749 val4 =
default(Vector2);
35751 int num749 = Dust.NewDust(
base.Center - Vector2.One * 5
f, 10, 10, 229, (0
f -
velocity.X) / 3
f, (0
f -
velocity.Y) / 3
f, 150, Color.Transparent, 0.7f);
35752 Main.dust[
num749].velocity = Vector2.Zero;
35754 Main.dust[
num749].noGravity =
true;
35755 }
35756 }
35758 {
35761 {
35763 }
35764 if (
type == 455 && Main.npc[(
int)
this.ai[1]].active && Main.npc[(
int)
this.ai[1]].type == 396)
35765 {
35766 if (Main.npc[(
int)
this.ai[1]].ai[0] == -2
f)
35767 {
35769 return;
35770 }
35771 val4 =
new Vector2(27
f, 59
f) * Main.npc[(int)this.ai[1]].
localAI[1];
35772 Vector2
vector135 = Utils.Vector2FromElipse(Main.npc[(
int)this.ai[1]].localAI[0].ToRotationVector2(),
val4);
35774 }
35775 else if (
type == 455 && Main.npc[(
int)this.ai[1]].active && Main.npc[(int)this.ai[1]].
type == 400)
35776 {
35777 val4 =
new Vector2(30
f, 30
f) * Main.npc[(int)this.ai[1]].
localAI[1];
35778 Vector2
vector136 = Utils.Vector2FromElipse(Main.npc[(
int)this.ai[1]].localAI[0].ToRotationVector2(),
val4);
35780 }
35781 else if (
type == 537 && Main.npc[(
int)this.ai[1]].active && Main.npc[(int)this.ai[1]].
type == 411)
35782 {
35785 base.position = Main.npc[(int)this.ai[1]].
Center +
vector137 -
base.Size / 2
f +
new Vector2(0
f, 0
f - Main.npc[(
int)this.ai[1]].gfxOffY);
35786 }
35787 else if (
type == 461 && Main.projectile[(
int)this.ai[1]].active && Main.projectile[(int)this.ai[1]].
type == 460)
35788 {
35789 Vector2
vector138 = Vector2.Normalize(Main.projectile[(
int)this.ai[1]].velocity);
35790 base.position = Main.projectile[(int)this.ai[1]].
Center +
vector138 * 16
f -
new Vector2((
float)
width, (float)
height) / 2
f +
new Vector2(0
f, 0
f - Main.projectile[(
int)
this.ai[1]].gfxOffY);
35791 velocity = Vector2.Normalize(Main.projectile[(
int)
this.ai[1]].velocity);
35792 }
35793 else if (
type == 642 && Main.projectile[(
int)
this.ai[1]].active && Main.projectile[(
int)
this.ai[1]].type == 641)
35794 {
35795 Projectile projectile = Main.projectile[(int)this.ai[1]];
35796 base.Center = projectile.Center;
35798 double radians35 = (float)(-projectile.direction) * ((float)
Math.PI / 3
f) / 50
f;
35799 val4 =
default(Vector2);
35803 }
35804 else
35805 {
35806 if (
type != 632 || !Main.projectile[(
int)this.ai[1]].active || Main.projectile[(int)this.ai[1]].
type != 633)
35807 {
35809 return;
35810 }
35811 float num750 = (float)(
int)this.ai[0] - 2.5f;
35812 Vector2
vector140 = Vector2.Normalize(Main.projectile[(
int)this.ai[1]].velocity);
35813 Projectile
projectile2 = Main.projectile[(int)this.ai[1]];
35816 Vector2
zero2 = Vector2.Zero;
35821 {
35825 {
35828 }
35829 else
35830 {
35833 }
35835 }
35836 else
35837 {
35843 }
35845 Vector2
unitY5 = Vector2.UnitY;
35847 val4 =
default(Vector2);
35849 Vector2
unitY6 = Vector2.UnitY;
35851 val4 =
default(Vector2);
35854 val4 =
default(Vector2);
35856 base.position = projectile2.Center +
vector140 * 16
f - base.Size / 2
f +
new Vector2(0
f, 0
f - Main.projectile[(
int)
this.ai[1]].gfxOffY);
35857 base.position +=
projectile2.velocity.ToRotation().ToRotationVector2() *
num756;
35858 base.position +=
zero2;
35861 val4 =
default(Vector2);
35866 {
35869 }
35870 if (!Collision.CanHitLine(Main.player[
owner].Center, 0, 0,
projectile2.Center, 0, 0))
35871 {
35873 }
35875 }
35877 {
35879 }
35881 {
35882 this.ai[0]++;
35883 if (this.ai[0] >= 300
f)
35884 {
35886 return;
35887 }
35888 scale = (float)
Math.Sin(
this.ai[0] * (
float)Math.PI / 300
f) * 10
f;
35890 {
35892 }
35893 }
35895 {
35897 {
35899 }
35901 if (Main.npc[(int)this.ai[1]].type == 400)
35902 {
35904 }
35907 {
35909 return;
35910 }
35913 {
35915 }
35916 }
35918 {
35922 {
35924 return;
35925 }
35928 {
35930 }
35931 }
35933 {
35937 {
35939 return;
35940 }
35943 {
35945 }
35946 }
35949 {
35951 }
35958 {
35960 }
35962 {
35965 }
35966 else if (
type == 461)
35967 {
35970 }
35971 else if (
type == 642)
35972 {
35975 }
35976 else if (
type == 632)
35977 {
35980 }
35981 else if (
type == 537)
35982 {
35985 }
35990 {
35992 }
35994 float amount = 0.5f;
35996 {
35997 NPC nPC3 = Main.npc[(int)this.ai[1]];
35998 if (
nPC3.type == 396)
35999 {
36002 {
36004 amount = 0.75f;
36005 }
36006 }
36007 }
36009 {
36010 amount = 0.75f;
36011 }
36014 {
36018 {
36019 float num768 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1
f) : 1
f) * ((
float)Math.PI / 2
f);
36020 float num769 = (float)Main.rand.NextDouble() * 2
f + 2
f;
36023 Main.dust[
num770].noGravity =
true;
36024 Main.dust[
num770].scale = 1.7f;
36025 }
36026 if (Main.rand.Next(5) == 0)
36027 {
36029 val4 =
default(Vector2);
36034 dust212.velocity *= 0.5f;
36036 }
36037 DelegateMethods.v3_1 =
new Vector3(0.3
f, 0.65
f, 0.7
f);
36039 }
36040 else if (
type == 642)
36041 {
36045 {
36046 float num773 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1
f) : 1
f) * ((
float)Math.PI / 2
f);
36047 float num774 = (float)Main.rand.NextDouble() * 2
f + 2
f;
36050 Main.dust[
num775].noGravity =
true;
36051 Main.dust[
num775].scale = 1.7f;
36052 }
36053 if (Main.rand.Next(5) == 0)
36054 {
36056 val4 =
default(Vector2);
36061 dust212.velocity *= 0.5f;
36063 }
36064 DelegateMethods.v3_1 =
new Vector3(0.3
f, 0.65
f, 0.7
f);
36066 }
36068 {
36072 {
36073 float num779 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1
f) : 1
f) * ((
float)Math.PI / 2
f);
36074 float num780 = (float)Main.rand.NextDouble() * 0.8f + 1
f;
36077 Main.dust[
num781].noGravity =
true;
36078 Main.dust[
num781].scale = 1.2f;
36079 }
36080 if (Main.rand.Next(5) == 0)
36081 {
36083 val4 =
default(Vector2);
36088 dust212.velocity *= 0.5f;
36090 }
36091 DelegateMethods.v3_1 =
new Vector3(0.4
f, 0.85
f, 0.9
f);
36093 }
36095 {
36100 {
36103 {
36104 float num786 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1
f) : 1
f) * ((
float)Math.PI / 2
f);
36105 float num787 = (float)Main.rand.NextDouble() * 0.8f + 1
f;
36108 Main.dust[
num789].noGravity =
true;
36109 Main.dust[
num789].scale = 1.2f;
36110 }
36111 }
36114 {
36116 val4 =
default(Vector2);
36121 dust212.velocity *= 0.5f;
36123 }
36124 DelegateMethods.v3_1 =
new Vector3(0.4
f, 0.85
f, 0.9
f);
36126 }
36128 {
36129 return;
36130 }
36138 float x5 = Main.rgbToHsl(
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB)).X;
36141 {
36142 float num792 =
velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? (-1
f) : 1
f) * ((
float)Math.PI / 2
f);
36143 float num793 = (float)Main.rand.NextDouble() * 0.8f + 1
f;
36146 Main.dust[
num794].color = color;
36147 Main.dust[
num794].scale = 1.2f;
36149 {
36152 dust212.velocity *=
scale;
36155 dust212.scale *=
scale;
36156 }
36157 Main.dust[
num794].noGravity =
true;
36159 {
36161 dust160.color = Color.White;
36164 dust212.scale /= 2
f;
36165 }
36166 float hue = (
x5 + Main.rand.NextFloat() * 0.4f) % 1
f;
36167 Main.dust[
num794].color = Color.Lerp(color, Main.hslToRgb(
hue, 1
f, 0.75f),
scale / 1.4f);
36168 }
36169 if (Main.rand.Next(5) == 0)
36170 {
36172 val4 =
default(Vector2);
36177 dust212.velocity *= 0.5f;
36179 }
36180 DelegateMethods.v3_1 = ((Color)(
ref color)).ToVector3() * 0.3f;
36181 float value24 = 0.1f * (float)
Math.Sin(Main.GlobalTimeWrappedHourly * 20
f);
36182 Vector2
size2 =
default(Vector2);
36185 if (Main.netMode != 2)
36186 {
36191 val4 =
default(Vector2);
36193 }
36195 }
36197 {
36202 {
36204 }
36206 int num798 = (int)this.ai[1];
36207 if (!Main.npc[
num797].active || Main.npc[
num797].type != 396)
36208 {
36210 return;
36211 }
36213 if (
localAI[0] >= 330
f && this.ai[0] > 0
f && Main.netMode != 1)
36214 {
36217 }
36218 if (Main.netMode != 1 &&
this.ai[0] > 0
f && (!Main.player[(
int)
this.ai[1]].active || Main.player[(
int)
this.ai[1]].dead))
36219 {
36222 }
36224 if (this.ai[0] > 0
f)
36225 {
36228 {
36230 }
36231 else
36232 {
36234 }
36236 {
36239 if (Main.expertMode)
36240 {
36242 }
36243 if (!Main.player[
num798].creativeGodMode)
36244 {
36246 }
36247 }
36248 }
36249 else
36250 {
36251 Vector2
value2 = Main.npc[(int)
Math.Abs(
this.ai[0]) - 1].Center - base.Center +
vector158;
36253 {
36255 }
36256 else
36257 {
36259 }
36261 {
36263 }
36264 }
36265 }
36267 {
36269 {
36272 }
36273 this.ai[0]++;
36274 if (this.ai[1] == 1
f)
36275 {
36276 if (this.ai[0] >= 130
f)
36277 {
36279 }
36280 else
36281 {
36283 }
36285 {
36287 }
36289 {
36291 }
36292 if (this.ai[0] >= 150
f)
36293 {
36295 return;
36296 }
36297 if (this.ai[0] % 30
f == 0
f && Main.netMode != 1)
36298 {
36301 }
36303 Lighting.AddLight(
base.Center, 0.3f, 0.75f, 0.9f);
36304 return;
36305 }
36307 if (this.ai[0] >= 40
f)
36308 {
36310 }
36311 else
36312 {
36314 }
36316 {
36318 }
36320 {
36322 }
36323 if (this.ai[0] >= 45
f)
36324 {
36326 return;
36327 }
36330 val4 =
default(Vector2);
36332 float num800 = this.ai[0] % 45
f / 45
f;
36335 {
36338 val4 =
default(Vector2);
36342 {
36343 int num803 = Dust.NewDust(
vector161 + Utils.RandomVector2(Main.rand, -8
f, 8
f) / 2
f, 8, 8, 197, 0
f, 0
f, 100, Color.Transparent);
36344 Main.dust[
num803].noGravity =
true;
36345 }
36346 }
36347 }
36349 {
36350 base.position.Y = this.ai[0];
36351 height = (int)this.ai[1];
36352 if (
base.Center.X > Main.player[
owner].Center.X)
36353 {
36355 }
36356 else
36357 {
36359 }
36361 if (
owner == Main.myPlayer)
36362 {
36364 {
36366 {
36368 return;
36369 }
36370 }
36371 }
36374 {
36376 Main.dust[
num807].noGravity =
true;
36379 dust212.velocity *= 0.5f;
36380 Main.dust[
num807].velocity.Y -= 0.5f;
36381 Main.dust[
num807].scale = 1.4f;
36382 Main.dust[
num807].position.X += 6
f;
36383 Main.dust[
num807].position.Y -= 2
f;
36384 }
36385 }
36387 {
36389 {
36391 {
36394 }
36395 if (this.ai[0] < 180
f)
36396 {
36399 {
36401 }
36402 }
36403 else
36404 {
36407 {
36410 return;
36411 }
36412 }
36413 this.ai[0]++;
36414 if (this.ai[0] % 30
f == 0
f && this.ai[0] < 180
f && Main.netMode != 1)
36415 {
36416 int[]
array3 =
new int[5];
36417 Vector2[]
array4 = (Vector2[])(
object)
new Vector2[5];
36421 {
36422 if (!Main.player[
num811].active || Main.player[
num811].dead)
36423 {
36424 continue;
36425 }
36429 {
36435 {
36436 break;
36437 }
36438 }
36439 }
36441 {
36443 float ai = Main.rand.Next(100);
36444 Vector2
vector163 = Vector2.Normalize(
vector162.RotatedByRandom(0.7853981852531433)) * 7
f;
36445 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector163.X,
vector163.Y, 466,
damage, 0
f, Main.myPlayer,
vector162.ToRotation(),
ai);
36446 }
36447 }
36448 Lighting.AddLight(
base.Center, 0.4f, 0.85f, 0.9f);
36450 {
36453 {
36455 }
36456 }
36457 if (
alpha >= 150 || !(this.ai[0] < 180
f))
36458 {
36459 return;
36460 }
36462 {
36463 float num815 = (float)Main.rand.NextDouble() * 1
f - 0.5f;
36465 {
36467 }
36469 {
36471 }
36474 val4 =
default(Vector2);
36477 val4 =
default(Vector2);
36479 int num816 = Dust.NewDust(
base.Center - Vector2.One * 5
f, 10, 10, 226, (0
f -
velocity.X) / 3
f, (0
f -
velocity.Y) / 3
f, 150, Color.Transparent, 0.7f);
36481 Main.dust[
num816].velocity = Vector2.Normalize(Main.dust[
num816].position -
base.Center) * 2
f;
36482 Main.dust[
num816].noGravity =
true;
36483 }
36485 {
36486 float num818 = (float)Main.rand.NextDouble() * 1
f - 0.5f;
36488 {
36490 }
36492 {
36494 }
36497 val4 =
default(Vector2);
36500 val4 =
default(Vector2);
36502 int num819 = Dust.NewDust(
base.Center - Vector2.One * 5
f, 10, 10, 226, (0
f -
velocity.X) / 3
f, (0
f -
velocity.Y) / 3
f, 150, Color.Transparent, 0.7f);
36503 Main.dust[
num819].velocity = Vector2.Zero;
36505 Main.dust[
num819].noGravity =
true;
36506 }
36507 }
36508 else if (
type == 466)
36509 {
36511 Lighting.AddLight(
base.Center, 0.3f, 0.45f, 0.5f);
36513 {
36515 {
36519 {
36521 {
36523 }
36524 }
36526 {
36528 return;
36529 }
36530 }
36532 {
36535 {
36537 float num824 = (float)Main.rand.NextDouble() * 0.8f + 1
f;
36540 Main.dust[
num825].noGravity =
true;
36541 Main.dust[
num825].scale = 1.2f;
36542 }
36543 if (Main.rand.Next(5) == 0)
36544 {
36546 val4 =
default(Vector2);
36548 int num826 = Dust.NewDust(
base.Center +
vector168 - Vector2.One * 4
f, 8, 8, 31, 0
f, 0
f, 100,
default(Color), 1.5f);
36551 dust212.velocity *= 0.5f;
36553 }
36554 }
36555 }
36556 else
36557 {
36559 {
36560 return;
36561 }
36567 while (true)
36568 {
36572 float f = (float)
num829 / 100
f * ((
float)Math.PI * 2
f);
36575 {
36576 vector169.Y *= -1
f;
36577 }
36580 {
36582 }
36584 {
36586 }
36588 {
36590 }
36592 {
36594 {
36597 break;
36598 }
36599 continue;
36600 }
36602 break;
36603 }
36605 {
36609 val4 =
default(Vector2);
36612 }
36613 }
36614 }
36615 else
36616 {
36618 {
36619 return;
36620 }
36621 if (
localAI[1] == 0
f && this.ai[0] >= 900
f)
36622 {
36623 this.ai[0] -= 1000
f;
36625 }
36627 Lighting.AddLight(
base.Center, 0.3f, 0.45f, 0.5f);
36629 {
36631 {
36635 {
36637 {
36639 }
36640 }
36642 {
36644 return;
36645 }
36646 }
36648 {
36651 {
36653 float num834 = (float)Main.rand.NextDouble() * 0.8f + 1
f;
36656 Main.dust[
num835].noGravity =
true;
36657 Main.dust[
num835].scale = 1.2f;
36658 }
36659 if (Main.rand.Next(5) == 0)
36660 {
36662 val4 =
default(Vector2);
36664 int num836 = Dust.NewDust(
base.Center +
vector171 - Vector2.One * 4
f, 8, 8, 31, 0
f, 0
f, 100,
default(Color), 1.5f);
36667 dust212.velocity *= 0.5f;
36669 }
36670 }
36671 }
36672 else
36673 {
36675 {
36676 return;
36677 }
36683 while (true)
36684 {
36688 float f2 = (float)
num839 / 100
f * ((
float)Math.PI * 2
f);
36691 {
36692 vector172.Y *= -1
f;
36693 }
36696 {
36698 }
36700 {
36702 }
36704 {
36706 }
36708 {
36710 {
36713 {
36715 }
36716 break;
36717 }
36718 continue;
36719 }
36721 break;
36722 }
36724 {
36725 return;
36726 }
36730 val4 =
default(Vector2);
36733 if (Main.rand.Next(4) == 0 && Main.netMode != 1 &&
localAI[1] == 0
f)
36734 {
36735 float num840 = (float)Main.rand.Next(-3, 4) * ((float)
Math.PI / 3
f) / 3
f;
36738 val4 =
default(Vector2);
36741 {
36742 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X -
vector173.X,
base.Center.Y -
vector173.Y,
vector173.X,
vector173.Y,
type,
damage,
knockBack,
owner,
vector173.ToRotation() + 1000
f,
this.ai[1]);
36743 }
36744 }
36745 }
36746 }
36747 }
36749 {
36750 if (this.ai[1] == -1
f)
36751 {
36753 }
36754 else if (this.ai[0] < 300
f)
36755 {
36757 }
36758 else
36759 {
36761 }
36763 {
36765 }
36767 {
36769 }
36774 {
36777 }
36779 {
36782 {
36783 float num842 = Main.rand.Next(2, 4);
36786 {
36789 }
36790 ((Vector2)(
ref vector174)).
_002Ector((
float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11));
36793 Main.dust[
num845].noGravity =
true;
36794 Main.dust[
num845].noLight =
true;
36796 if (Main.rand.Next(8) == 0)
36797 {
36801 dust212.scale += 0.5f;
36802 }
36803 else
36804 {
36806 }
36807 }
36808 }
36809 this.ai[0]++;
36810 if (this.ai[0] >= 60
f)
36811 {
36812 int num846 = (int)(this.ai[0] - 0
f) / 60;
36816 {
36817 float num849 = Main.rand.Next(1, 3);
36818 ((Vector2)(
ref vector175)).
_002Ector((
float)Main.rand.Next(-10, 11), (float)Main.rand.Next(-10, 11));
36821 Main.dust[
num850].noGravity =
true;
36822 Main.dust[
num850].noLight =
true;
36824 if (Main.rand.Next(2) == 0)
36825 {
36829 dust212.scale += 0.5f;
36830 }
36831 else
36832 {
36834 }
36835 Main.dust[
num850].fadeIn = 2
f;
36836 }
36837 }
36838 if (this.ai[0] == 300
f && this.ai[1] != -1
f && Main.netMode != 1)
36839 {
36840 if (!
NPC.AnyNPCs(454))
36841 {
36843 }
36844 else
36845 {
36847 }
36848 }
36849 else if (this.ai[0] == 320
f)
36850 {
36852 return;
36853 }
36855 if (this.ai[1] == -1
f)
36856 {
36858 {
36860 }
36861 }
36862 else
36863 {
36864 flag33 = !(this.ai[1] >= 0
f) || !Main.npc[(
int)this.ai[1]].active;
36865 if ((
flag33 || Main.npc[(
int)
this.ai[1]].type != 439) && (
flag33 || Main.npc[(int)this.ai[1]].
type != 454) && (
flag33 || Main.npc[(int)this.ai[1]].
type != 521))
36866 {
36868 }
36869 }
36871 {
36873 }
36874 else
36875 {
36876 Lighting.AddLight(
base.Center, 1.1f, 0.9f, 0.4f);
36877 }
36878 }
36880 {
36881 if (Main.player[
owner].dead)
36882 {
36884 }
36885 if (Main.player[
owner].magicLantern)
36886 {
36888 }
36890 {
36892 {
36894 }
36896 {
36898 }
36899 }
36902 Lighting.AddLight(
base.position, 0.35f, 0.35f, 0.1f);
36905 {
36908 val4 = base.Center - Main.player[Main.myPlayer].Center;
36909 if (((Vector2)(
ref val4)).Length() < (
float)(Main.screenWidth +
num851 * 16))
36910 {
36914 {
36916 {
36917 if (Main.rand.Next(4) == 0)
36918 {
36921 {
36922 int num858 = Dust.NewDust(
new Vector2((
float)(
num856 * 16), (
float)(
num857 * 16)), 16, 16, 204, 0
f, 0
f, 150,
default(Color), 0.3
f);
36923 Main.dust[
num858].fadeIn = 0.75f;
36926 dust212.velocity *= 0.1f;
36927 Main.dust[
num858].noLight =
true;
36928 }
36929 }
36930 }
36931 }
36932 }
36933 }
36936 vector176.Y -= 40
f;
36939 {
36940 base.Center = Main.player[
owner].Center;
36941 }
36945 {
36948 }
36950 {
36953 }
36955 {
36958 }
36961 {
36964 {
36966 {
36968 }
36969 else
36970 {
36972 }
36973 }
36977 {
36981 {
36983 }
36984 }
36986 {
36988 }
36989 return;
36990 }
36992 {
36994 }
36996 {
36998 }
36999 else
37000 {
37002 }
37005 {
37009 {
37011 }
37012 }
37013 }
37015 {
37020 base.position.X = center7.X - (float)(
width / 2);
37021 base.position.Y = center7.Y - (float)(
height / 2);
37022 if ((
double)
localAI[0] < 0.1)
37023 {
37025 }
37026 else
37027 {
37029 }
37031 {
37033 }
37034 velocity.X += this.ai[0] * 1.5f;
37035 velocity.Y += this.ai[1] * 1.5f;
37037 {
37040 }
37041 this.ai[0] *= 1.05f;
37042 this.ai[1] *= 1.05f;
37044 {
37046 {
37049 Main.dust[
num864].noGravity =
true;
37052 dust212.velocity *= 0.1f;
37059 dust212.scale +=
scale * 0.75f;
37060 }
37061 }
37062 }
37064 {
37069 {
37071 {
37073 }
37075 {
37076 PositionInWorld =
base.Center,
37077 MovementVector = Vector2.Zero
37078 });
37079 }
37081 if (this.ai[1] >= 1
f)
37082 {
37084 }
37087 {
37089 }
37090 if (this.ai[0] >
num865)
37091 {
37094 return;
37095 }
37098 {
37104 Opacity =
MathHelper.Clamp(Utils.Remap(
fromValue, 0
f, 0.25f, 0
f, 1
f) * Utils.Remap(
fromValue, 0.75
f, 1
f, 1
f, 0
f), 0
f, 1
f) * 0.85
f;
37105 }
37106 else
37107 {
37109 }
37113 {
37115 }
37116 else
37117 {
37119 }
37121 {
37124 Rectangle
value3 =
default(Rectangle);
37126 {
37128 {
37129 continue;
37130 }
37133 {
37134 continue;
37135 }
37138 {
37139 continue;
37140 }
37143 {
37145 {
37148 }
37149 else
37150 {
37153 }
37154 }
37158 }
37159 }
37161 Vector2 pos = base.Center +
vector4 * 16
f;
37163 {
37165 }
37167 {
37168 return;
37169 }
37174 {
37176 }
37178 {
37179 return;
37180 }
37182 if (Main.netMode != 2)
37183 {
37186 {
37188 }
37189 }
37190 if (Main.netMode == 1)
37191 {
37192 return;
37193 }
37195 {
37198 {
37200 }
37201 }
37202 }
37204 {
37206 {
37209 {
37211 }
37212 }
37214 {
37216 }
37217 if (this.ai[0] == 0
f)
37218 {
37220 if (this.ai[1] > 20
f)
37221 {
37222 velocity.Y += 0.1f;
37223 velocity.X *= 0.992f;
37224 }
37226 return;
37227 }
37229 if (this.ai[0] == 1
f)
37230 {
37233 }
37234 else
37235 {
37237 int num872 = (int)(0
f - this.ai[0]);
37240 base.position.X -=
width / 2;
37241 base.position.Y -=
height / 2;
37242 if (!Main.npc[
num872].active || Main.npc[
num872].life < 0)
37243 {
37247 velocity =
new Vector2((
float)Main.rand.Next(-100, 101), (
float)Main.rand.Next(-100, 101));
37251 }
37252 else if (((Vector2)(
ref velocity)).Length() > (float)((Main.npc[
num872].width + Main.npc[
num872].height) / 3))
37253 {
37255 }
37256 }
37257 if (this.ai[0] != 0
f)
37258 {
37260 if (this.ai[1] > 90
f)
37261 {
37263 }
37264 }
37265 }
37267 {
37269 {
37272 {
37274 }
37275 }
37276 this.ai[0]++;
37277 if (this.ai[0] <= 40
f)
37278 {
37281 {
37283 }
37285 if (this.ai[0] == 40
f)
37286 {
37288 switch (Main.rand.Next(3))
37289 {
37290 case 0:
37292 break;
37293 case 1:
37295 break;
37296 case 2:
37298 break;
37299 }
37300 }
37301 }
37302 else if (this.ai[0] <= 60
f)
37303 {
37305 if (this.ai[0] == 60
f)
37306 {
37308 }
37309 }
37310 else if (this.ai[0] <= 210
f)
37311 {
37312 if (Main.netMode != 1 && (
localAI[0] += 1
f) >=
this.ai[1])
37313 {
37316 Main.item[
num873].velocity = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
new Vector2(3
f, 2
f) * (Main.rand.NextFloat() * 0.5f + 0.5f) - Vector2.UnitY * 1
f;
37317 }
37318 if (this.ai[0] == 210
f)
37319 {
37321 }
37322 }
37323 else
37324 {
37327 if (this.ai[0] == 239
f)
37328 {
37330 }
37331 if (this.ai[0] == 240
f)
37332 {
37334 }
37335 }
37336 if (
alpha < 90 && Main.rand.Next(3) == 0)
37337 {
37340 Vector2
vector6 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
vector5;
37343 Main.dust[
num874].velocity = Vector2.Zero;
37344 }
37346 float num876 = 0.70980394f;
37349 }
37351 {
37353 {
37356 {
37358 }
37359 }
37360 else
37361 {
37363 }
37364 if (this.ai[0] > 30
f)
37365 {
37367 {
37368 velocity.Y -= 0.05f;
37369 }
37370 velocity.X *= 0.98f;
37371 }
37372 else
37373 {
37375 }
37378 {
37380 {
37381 velocity.Y *= 0.98f;
37382 }
37384 {
37385 velocity.Y -= 0.2f;
37386 }
37387 velocity.X *= 0.94f;
37388 }
37389 }
37391 {
37392 this.ai[0] += 0.6f;
37393 if (this.ai[0] > 500
f)
37394 {
37396 }
37398 {
37399 if (Main.rand.Next(3) != 0)
37400 {
37403 Main.dust[
num880].noGravity =
true;
37406 dust212.velocity *= 0.1f;
37408 {
37412 }
37413 float num881 = (800
f - this.ai[0]) / 800
f;
37416 dust212.scale *=
num881 + 0.1f;
37417 }
37418 }
37419 velocity.Y += 0.008f;
37420 }
37422 {
37426 {
37428 }
37430 {
37432 }
37434 {
37436 }
37438 {
37440 }
37442 {
37444 }
37446 {
37448 }
37450 {
37452 }
37454 {
37456 }
37457 else
37458 {
37461 }
37462 Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = true;
37463 if (
owner == Main.myPlayer)
37464 {
37466 {
37468 {
37470 {
37471 Main.projectile[
num883].Kill();
37472 }
37473 else
37474 {
37476 }
37477 }
37478 }
37479 }
37480 if (this.ai[0] == 0
f)
37481 {
37482 if ((
double)((Vector2)(
ref velocity)).Length() < 0.1)
37483 {
37488 return;
37489 }
37492 {
37494 }
37495 else
37496 {
37498 }
37500 return;
37501 }
37502 if (Main.player[
owner].Center.X <
base.Center.X)
37503 {
37505 }
37506 else
37507 {
37509 }
37513 if (this.ai[1] > 0
f)
37514 {
37516 }
37517 else
37518 {
37520 }
37521 if (this.ai[1] >= 90
f)
37522 {
37524 }
37525 }
37527 {
37528 Vector2
vector7 =
default(Vector2);
37532 {
37534 return;
37535 }
37540 {
37541 int num886 = Dust.NewDust(
base.Center, 0, 0, 228, 0
f, 0
f, 100);
37542 Main.dust[
num886].noGravity =
true;
37545 dust212.position +=
new Vector2(4
f);
37548 dust212.scale += Main.rand.NextFloat() * 1
f;
37549 }
37550 }
37552 {
37554 }
37556 {
37558 }
37560 {
37562 }
37564 {
37568 int num889 = (int)this.ai[0];
37572 {
37573 case 536:
37576 break;
37577 case 591:
37579 break;
37580 }
37582 {
37583 case 1:
37585 {
37587 return;
37588 }
37590 {
37592 base.position += Main.player[
owner].position - Main.player[
owner].oldPosition;
37595 {
37597 return;
37598 }
37599 }
37600 else
37601 {
37603 }
37604 break;
37605 case 0:
37607 {
37609 return;
37610 }
37612 break;
37613 }
37615 }
37617 {
37629 {
37630 case 539:
37636 break;
37637 case 573:
37643 break;
37644 case 574:
37653 if (Main.expertMode)
37654 {
37656 }
37658 break;
37659 }
37661 {
37662 int num897 = (int)this.ai[1];
37664 {
37666 return;
37667 }
37669 }
37670 this.ai[0]++;
37671 if (this.ai[0] <
num893)
37672 {
37674 int num898 = (int)this.ai[1];
37676 {
37677 if (!
flag38 && Main.npc[
num898].oldPos[1] != Vector2.Zero)
37678 {
37679 base.position += Main.npc[
num898].position - Main.npc[
num898].oldPos[1];
37680 }
37681 }
37682 else
37683 {
37686 }
37688 {
37691 {
37693 }
37694 }
37696 {
37697 if (Main.rand.Next(12) == 0)
37698 {
37699 int num900 = Dust.NewDust(
base.Center, 8, 8, 180);
37703 dust212.velocity *= 0.2f;
37704 Main.dust[
num900].noGravity =
true;
37705 }
37707 {
37710 {
37712 }
37713 }
37715 }
37717 {
37718 if (Main.rand.Next(2) == 0)
37719 {
37720 int num901 = Dust.NewDust(
base.Center, 8, 8, 242);
37723 Main.dust[
num901].noGravity =
true;
37724 Main.dust[
num901].scale = 1.5f;
37725 }
37727 }
37729 {
37730 if (Main.rand.Next(10) == 0)
37731 {
37732 int num902 = Dust.NewDust(
base.Center, 8, 8, 242);
37735 Main.dust[
num902].noGravity =
true;
37736 Main.dust[
num902].scale = 1.5f;
37737 }
37739 {
37742 if (Collision.CanHitLine(
base.Center, 0, 0, Main.player[
target2].Center, 0, 0))
37743 {
37745 }
37747 }
37749 }
37750 }
37751 if (this.ai[0] ==
num893)
37752 {
37756 {
37757 int num905 = (int)this.ai[1];
37759 {
37761 }
37762 else
37763 {
37765 }
37766 }
37767 else
37768 {
37770 }
37772 {
37774 }
37776 value5.X += Main.rand.Next(-50, 51);
37777 value5.Y += Main.rand.Next(-50, 51);
37778 value5.X *= (float)Main.rand.Next(80, 121) * 0.01f;
37779 value5.Y *= (float)Main.rand.Next(80, 121) * 0.01f;
37782 {
37784 }
37786 {
37789 }
37790 else
37791 {
37792 if (Main.netMode != 1 && Collision.CanHitLine(
base.Center, 0, 0, Main.player[
num904].Center, 0, 0))
37793 {
37795 }
37797 }
37798 }
37799 if (!(this.ai[0] >=
num893))
37800 {
37801 return;
37802 }
37805 {
37807 {
37810 {
37812 }
37813 }
37814 if (Main.rand.Next(2) == 0)
37815 {
37819 dust212.scale += (float)Main.rand.Next(50) * 0.01f;
37820 Main.dust[
num906].noGravity =
true;
37823 dust212.velocity *= 0.1f;
37824 Main.dust[
num906].fadeIn = Main.rand.NextFloat() * 1.5f;
37825 }
37826 if (Main.rand.Next(3) == 0)
37827 {
37831 dust212.scale += 0.3f + (float)Main.rand.Next(50) * 0.01f;
37832 Main.dust[
num907].noGravity =
true;
37835 dust212.velocity *= 0.1f;
37836 Main.dust[
num907].fadeIn = Main.rand.NextFloat() * 1.5f;
37837 }
37838 }
37840 {
37841 if (Main.rand.Next(4) == 0)
37842 {
37843 int num908 = Dust.NewDust(
base.Center, 8, 8, 242);
37847 dust212.velocity *= 0.2f;
37848 Main.dust[
num908].noGravity =
true;
37849 Main.dust[
num908].scale = 1.5f;
37850 }
37852 }
37853 }
37855 {
37856 scale = this.ai[1];
37857 this.ai[0]++;
37858 if (this.ai[0] >= 30
f)
37859 {
37862 {
37864 }
37865 }
37866 else
37867 {
37868 if (!(this.ai[0] >= 0
f))
37869 {
37870 return;
37871 }
37874 {
37877 {
37880 }
37881 }
37882 }
37883 }
37885 {
37886 if (this.ai[0] == 1
f)
37887 {
37891 {
37893 }
37894 }
37895 else
37896 {
37900 {
37903 }
37904 }
37907 {
37911 {
37913 }
37914 }
37915 velocity.Y -= 0.03f;
37916 velocity.X *= 0.97f;
37917 }
37919 {
37925 {
37927 }
37929 {
37931 }
37932 else
37933 {
37935 }
37940 {
37942 }
37944 {
37946 }
37948 {
37951 }
37953 {
37955 }
37957 {
37959 }
37962 {
37964 }
37966 {
37967 velocity.X += 0.002f *
num912;
37968 velocity.Y += 0.002f *
num911;
37969 }
37970 else
37971 {
37972 velocity.X -= 0.002f *
num912;
37973 velocity.Y -= 0.002f *
num911;
37974 }
37976 if (this.ai[0] > 5400
f)
37977 {
37981 {
37984 {
37986 }
37987 }
37988 else if (
owner == Main.myPlayer)
37989 {
37991 }
37992 }
37993 else
37994 {
37995 val4 = base.Center - Main.player[
owner].Center;
37998 {
38000 }
38002 {
38004 }
38006 {
38008 }
38010 {
38012 }
38014 {
38016 }
38018 {
38020 }
38022 {
38024 }
38025 if (!Main.player[
owner].sporeSac)
38026 {
38028 }
38031 {
38034 {
38036 }
38037 }
38038 }
38040 Vector2
vector9 =
default(Vector2);
38044 {
38045 if (Main.npc[
num915].CanBeChasedBy(
this))
38046 {
38051 {
38055 }
38056 }
38057 }
38059 {
38064 }
38065 else if ((
double)((Vector2)(
ref velocity)).Length() > 0.2)
38066 {
38068 }
38069 }
38071 {
38074 {
38076 }
38077 else
38078 {
38080 }
38083 if (this.ai[0] >= 60
f)
38084 {
38086 {
38089 {
38091 }
38092 }
38093 else if (
owner == Main.myPlayer)
38094 {
38096 }
38097 }
38098 else if (
alpha > 80)
38099 {
38102 {
38104 }
38105 }
38106 }
38108 {
38113 {
38115 {
38117 }
38119 {
38121 }
38123 {
38125 }
38127 {
38130 {
38132 }
38133 }
38134 Lighting.AddLight(
base.Center, 0.5f, 0.1f, 0.3f);
38135 }
38136 else if (
type == 596)
38137 {
38141 {
38143 }
38145 {
38147 }
38149 {
38151 }
38153 {
38156 {
38158 }
38159 }
38162 {
38164 }
38166 {
38168 }
38169 this.ai[1]++;
38170 float num924 = this.ai[1] / 180
f * ((float)
Math.PI * 2
f);
38172 {
38173 if (Main.rand.Next(3) != 0)
38174 {
38175 return;
38176 }
38177 Dust
dust161 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 27, 0
f, -2
f)];
38179 Vector2
unitY7 = Vector2.UnitY;
38181 val4 =
default(Vector2);
38183 dust161.noGravity = true;
38186 dust161.fadeIn = 0.5f;
38187 dust161.alpha = 200;
38188 }
38190 {
38192 if (Main.expertMode)
38193 {
38195 }
38196 base.position =
base.Center;
38198 base.Center =
base.position;
38201 {
38202 Dust
dust162 = Main.dust[Dust.NewDust(
base.position,
width,
height, Utils.SelectRandom<
int>(Main.rand, 27, 6), 0
f, -2
f)];
38203 dust162.noGravity = true;
38205 {
38207 }
38208 }
38209 }
38210 }
38211 int num928 = (int)this.ai[0];
38213 {
38215 {
38218 {
38220 }
38222 }
38223 }
38224 else
38225 {
38227 {
38229 }
38230 if (this.ai[0] != -1
f)
38231 {
38234 }
38235 }
38236 }
38238 {
38240 if (
flag43 && this.ai[1] == 1
f && Main.netMode != 2)
38241 {
38244 {
38245 int num930 = Utils.SelectRandom<
int>(Main.rand, 229, 229, 161);
38247 dust163.noGravity = true;
38248 dust163.scale = 1.75f + Main.rand.NextFloat() * 1.25f;
38249 dust163.fadeIn = 0.25f;
38252 dust212.velocity *= 3.5f + Main.rand.NextFloat() * 0.5f;
38253 dust163.noLight = true;
38254 }
38255 }
38257 {
38260 }
38262 {
38267 {
38269 }
38270 this.ai[1] =
vector12.ToRotation();
38272 }
38273 this.ai[0]++;
38274 if (this.ai[0] <= 50
f)
38275 {
38277 {
38278 if (Main.rand.Next(4) == 0)
38279 {
38280 Vector2
vector14 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38282 dust164.noGravity = true;
38283 dust164.position = base.Center -
vector14 * (float)Main.rand.Next(10, 21);
38284 val4 =
default(Vector2);
38285 dust164.velocity =
vector14.RotatedBy(1.5707963705062866,
val4) * 4
f;
38286 dust164.scale = 0.5f + Main.rand.NextFloat();
38287 dust164.fadeIn = 0.5f;
38288 }
38289 if (Main.rand.Next(4) == 0)
38290 {
38291 Vector2
vector15 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38293 dust165.noGravity = true;
38294 dust165.position = base.Center -
vector15 * 30
f;
38295 val4 =
default(Vector2);
38296 dust165.velocity =
vector15.RotatedBy(-1.5707963705062866,
val4) * 2
f;
38297 dust165.scale = 0.5f + Main.rand.NextFloat();
38298 dust165.fadeIn = 0.5f;
38299 }
38300 }
38301 if (
type == 578 && Main.rand.Next(2) == 0)
38302 {
38303 Vector2
vector16 = this.ai[1].ToRotationVector2();
38304 val4 =
default(Vector2);
38305 Vector2
vector17 =
vector16.RotatedBy(1.5707963705062866,
val4) * (float)(Main.rand.Next(2) == 0).ToDirectionInt() * (float)Main.rand.Next(10, 21);
38311 dust166.noGravity = true;
38312 dust166.position = base.Center +
vector17;
38314 dust166.scale = 0.5f + Main.rand.NextFloat();
38315 dust166.fadeIn = 0.5f;
38320 dust166.noGravity = true;
38321 dust166.position = base.Center +
vector17 / 2
f;
38323 dust166.scale = 1
f + Main.rand.NextFloat();
38324 }
38326 {
38327 if (Main.rand.Next(4) == 0)
38328 {
38329 Vector2
vector20 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38331 dust167.noGravity = true;
38332 dust167.position = base.Center -
vector20 * (float)Main.rand.Next(10, 21);
38333 val4 =
default(Vector2);
38334 dust167.velocity =
vector20.RotatedBy(1.5707963705062866,
val4) * 4
f;
38335 dust167.scale = 0.5f + Main.rand.NextFloat();
38336 dust167.fadeIn = 0.5f;
38337 }
38338 if (Main.rand.Next(4) == 0)
38339 {
38340 Vector2
vector21 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38342 dust168.noGravity = true;
38343 dust168.position = base.Center -
vector21 * 30
f;
38344 val4 =
default(Vector2);
38345 dust168.velocity =
vector21.RotatedBy(-1.5707963705062866,
val4) * 2
f;
38346 dust168.scale = 0.5f + Main.rand.NextFloat();
38347 dust168.fadeIn = 0.5f;
38348 }
38349 }
38350 }
38351 else if (this.ai[0] <= 90
f)
38352 {
38353 if (this.ai[0] == 90
f)
38354 {
38356 {
38358 }
38359 else
38360 {
38362 }
38363 }
38364 scale = (this.ai[0] - 50
f) / 40
f;
38368 {
38369 if (Main.rand.Next(2) == 0)
38370 {
38371 Vector2
vector22 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38373 dust169.noGravity = true;
38374 dust169.position = base.Center -
vector22 * (float)Main.rand.Next(10, 21);
38375 val4 =
default(Vector2);
38376 dust169.velocity =
vector22.RotatedBy(1.5707963705062866,
val4) * 6
f;
38377 dust169.scale = 0.5f + Main.rand.NextFloat();
38378 dust169.fadeIn = 0.5f;
38379 dust169.customData =
base.Center;
38380 }
38381 if (Main.rand.Next(2) == 0)
38382 {
38383 Vector2
vector23 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38385 dust173.noGravity = true;
38386 dust173.position = base.Center -
vector23 * 30
f;
38387 val4 =
default(Vector2);
38388 dust173.velocity =
vector23.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38389 dust173.scale = 0.5f + Main.rand.NextFloat();
38390 dust173.fadeIn = 0.5f;
38391 dust173.customData =
base.Center;
38392 }
38393 }
38395 {
38396 Vector2
vector25 = this.ai[1].ToRotationVector2();
38398 val4 =
default(Vector2);
38399 Vector2
vector26 =
spinningpoint65.RotatedBy(1.5707963705062866,
val4) * (float)(Main.rand.Next(2) == 0).ToDirectionInt() * (float)Main.rand.Next(10, 21);
38400 vector25 *= (float)Main.rand.Next(-80, 81);
38403 int num934 = Utils.SelectRandom<
int>(Main.rand, 229, 229);
38405 dust174.noGravity = true;
38406 dust174.position = base.Center +
vector26;
38408 dust174.scale = 0.5f + Main.rand.NextFloat();
38409 dust174.fadeIn = 0.5f;
38410 if (this.ai[0] == 90
f && Main.netMode != 1)
38411 {
38412 Vector2
vector28 = this.ai[1].ToRotationVector2() * 8
f;
38413 float ai2 = Main.rand.Next(80);
38414 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X -
vector28.X,
base.Center.Y -
vector28.Y,
vector28.X,
vector28.Y, 580, 50, 1
f, Main.myPlayer,
this.ai[1],
ai2);
38415 }
38416 }
38417 else if (
type == 579)
38418 {
38419 if (this.ai[0] == 90
f && Main.netMode != 1)
38420 {
38424 {
38426 Main.npc[
num936].velocity = -Vector2.UnitY.RotatedByRandom(6.2831854820251465) * (float)Main.rand.Next(4, 9) - Vector2.UnitY * 2
f;
38427 Main.npc[
num936].netUpdate =
true;
38428 }
38429 }
38430 }
38431 else if (
type == 813)
38432 {
38433 if (Main.rand.Next(2) == 0)
38434 {
38435 Vector2
vector29 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38437 dust175.noGravity = true;
38438 dust175.position = base.Center -
vector29 * (float)Main.rand.Next(10, 21);
38439 val4 =
default(Vector2);
38440 dust175.velocity =
vector29.RotatedBy(1.5707963705062866,
val4) * 6
f;
38441 dust175.scale = 0.5f + Main.rand.NextFloat();
38442 dust175.fadeIn = 0.5f;
38443 dust175.customData =
base.Center;
38444 }
38445 if (Main.rand.Next(2) == 0)
38446 {
38447 Vector2
vector30 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38449 dust176.noGravity = true;
38450 dust176.position = base.Center -
vector30 * 30
f;
38451 val4 =
default(Vector2);
38452 dust176.velocity =
vector30.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38453 dust176.scale = 0.5f + Main.rand.NextFloat();
38454 dust176.fadeIn = 0.5f;
38455 dust176.customData =
base.Center;
38456 }
38457 if (this.ai[0] == 90
f && Main.netMode != 1)
38458 {
38460 Main.npc[
num937].netUpdate =
true;
38461 }
38462 }
38463 }
38464 else if (this.ai[0] <= 120
f)
38465 {
38470 {
38471 if (Main.rand.Next(2) == 0)
38472 {
38473 Vector2
vector31 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38475 dust177.noGravity = true;
38476 dust177.position = base.Center -
vector31 * (float)Main.rand.Next(10, 21);
38477 val4 =
default(Vector2);
38478 dust177.velocity =
vector31.RotatedBy(1.5707963705062866,
val4) * 6
f;
38479 dust177.scale = 0.5f + Main.rand.NextFloat();
38480 dust177.fadeIn = 0.5f;
38481 dust177.customData =
base.Center;
38482 }
38483 else
38484 {
38485 Vector2
vector32 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38487 dust178.noGravity = true;
38488 dust178.position = base.Center -
vector32 * 30
f;
38489 val4 =
default(Vector2);
38490 dust178.velocity =
vector32.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38491 dust178.scale = 0.5f + Main.rand.NextFloat();
38492 dust178.fadeIn = 0.5f;
38493 dust178.customData =
base.Center;
38494 }
38495 }
38496 else if (Main.rand.Next(2) == 0)
38497 {
38498 Vector2
vector33 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38500 dust179.noGravity = true;
38501 dust179.position = base.Center -
vector33 * (float)Main.rand.Next(10, 21);
38502 val4 =
default(Vector2);
38503 dust179.velocity =
vector33.RotatedBy(1.5707963705062866,
val4) * 6
f;
38504 dust179.scale = 0.5f + Main.rand.NextFloat();
38505 dust179.fadeIn = 0.5f;
38506 dust179.customData =
base.Center;
38507 }
38508 else
38509 {
38510 Vector2
vector34 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
38512 dust180.noGravity = true;
38513 dust180.position = base.Center -
vector34 * 30
f;
38514 val4 =
default(Vector2);
38515 dust180.velocity =
vector34.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38516 dust180.scale = 0.5f + Main.rand.NextFloat();
38517 dust180.fadeIn = 0.5f;
38518 dust180.customData =
base.Center;
38519 }
38520 }
38521 else
38522 {
38523 scale = 1
f - (this.ai[0] - 120
f) / 60
f;
38527 {
38529 }
38531 {
38533 {
38534 switch (Main.rand.Next(3))
38535 {
38536 case 0:
38537 {
38538 Vector2
vector37 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
scale;
38540 dust182.noGravity = true;
38541 dust182.position = base.Center -
vector37 * (float)Main.rand.Next(10, 21);
38542 val4 =
default(Vector2);
38543 dust182.velocity =
vector37.RotatedBy(1.5707963705062866,
val4) * 6
f;
38544 dust182.scale = 0.5f + Main.rand.NextFloat();
38545 dust182.fadeIn = 0.5f;
38546 dust182.customData =
base.Center;
38547 break;
38548 }
38549 case 1:
38550 {
38551 Vector2
vector36 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
scale;
38553 dust181.noGravity = true;
38554 dust181.position = base.Center -
vector36 * 30
f;
38555 val4 =
default(Vector2);
38556 dust181.velocity =
vector36.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38557 dust181.scale = 0.5f + Main.rand.NextFloat();
38558 dust181.fadeIn = 0.5f;
38559 dust181.customData =
base.Center;
38560 break;
38561 }
38562 }
38563 }
38564 }
38565 else
38566 {
38568 {
38569 switch (Main.rand.Next(3))
38570 {
38571 case 0:
38572 {
38573 Vector2
vector39 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
scale;
38575 dust185.noGravity = true;
38576 dust185.position = base.Center -
vector39 * (float)Main.rand.Next(10, 21);
38577 val4 =
default(Vector2);
38578 dust185.velocity =
vector39.RotatedBy(1.5707963705062866,
val4) * 6
f;
38579 dust185.scale = 0.5f + Main.rand.NextFloat();
38580 dust185.fadeIn = 0.5f;
38581 dust185.customData =
base.Center;
38582 break;
38583 }
38584 case 1:
38585 {
38586 Vector2
vector38 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) *
scale;
38588 dust184.noGravity = true;
38589 dust184.position = base.Center -
vector38 * 30
f;
38590 val4 =
default(Vector2);
38591 dust184.velocity =
vector38.RotatedBy(-1.5707963705062866,
val4) * 3
f;
38592 dust184.scale = 0.5f + Main.rand.NextFloat();
38593 dust184.fadeIn = 0.5f;
38594 dust184.customData =
base.Center;
38595 break;
38596 }
38597 }
38598 }
38599 }
38600 }
38601 if (
type == 813 && Main.rand.NextFloat() <
Opacity)
38602 {
38603 Dust
dust186 = Dust.NewDustPerfect(
base.Center + Main.rand.NextVector2Circular(3
f, 20
f), 90);
38604 dust186.velocity = Vector2.UnitY;
38605 dust186.noGravity = true;
38606 dust186.scale =
scale;
38607 }
38608 }
38610 {
38612 {
38614 }
38615 if (this.ai[0] == 0
f)
38616 {
38619 {
38622 return;
38623 }
38624 }
38625 else if (this.ai[0] == 1
f)
38626 {
38627 Vector2
zero3 = Vector2.Zero;
38628 if (
type != 582 || !Main.npc[(
int)this.ai[1]].active || Main.npc[(int)this.ai[1]].
type != 124)
38629 {
38631 return;
38632 }
38633 NPC.lazyNPCOwnedProjectileSearchArray[(int)this.ai[1]] =
whoAmI;
38639 {
38641 return;
38642 }
38646 }
38648 }
38650 {
38652 {
38654 }
38655 Vector2
zero4 = Vector2.Zero;
38656 if (Main.npc[(int)this.ai[0]].active && Main.npc[(int)this.ai[0]].townNPC)
38657 {
38662 {
38664 if (!((Rectangle)(
ref hitbox)).Intersects(Main.npc[(
int)this.ai[0]].Hitbox))
38665 {
38669 {
38671 }
38675 return;
38676 }
38677 }
38679 int num942 = Main.npc[(int)this.ai[0]].lifeMax - Main.npc[(
int)this.ai[0]].life;
38681 {
38683 }
38685 {
38686 NPC nPC6 = Main.npc[(int)this.ai[0]];
38689 Main.npc[(int)this.ai[0]].HealEffect(
num942);
38690 }
38691 }
38692 else
38693 {
38695 }
38696 }
38698 {
38700 }
38702 {
38704 {
38706 {
38709 {
38713 dust212.velocity *= 0.3f;
38714 Main.dust[
num945].noGravity =
true;
38715 }
38716 }
38718 {
38721 {
38723 }
38724 }
38726 bool flag44 = player12.active && !player12.dead && Vector2.Distance(
player12.Center,
base.Center) < 800
f;
38728 direction = ((player12.Center.X >
base.Center.X) ? 1 : (-1));
38733 {
38736 }
38738 {
38740 {
38741 float num949 = player12.Center.X -
base.Center.X;
38742 velocity.X += 0.05f * (float)
direction * (0.6
f +
Math.Abs(Main.WindForVisuals));
38744 {
38745 velocity.X -= 0.1f;
38746 }
38748 {
38749 velocity.X += 0.1f;
38750 }
38751 }
38753 {
38754 velocity.Y += 0.05f;
38756 {
38757 velocity.Y -= 0.1f;
38758 }
38759 }
38761 {
38762 velocity.Y -= 0.1f;
38764 {
38765 velocity.Y += 0.2f;
38766 }
38767 }
38768 }
38769 else
38770 {
38771 velocity.Y += 0.2f;
38773 {
38774 velocity.Y += 0.2f;
38775 }
38777 {
38778 velocity.Y -= 0.2f;
38779 }
38780 }
38782 }
38784 {
38786 {
38789 if (this.ai[2] == 1
f)
38790 {
38793 }
38796 {
38798 }
38799 }
38801 {
38803 }
38805 {
38807 }
38809 {
38810 float num952 = (float)Main.rand.Next(28, 42) * 0.005f;
38811 num952 += (float)(270 - Main.mouseTextColor) / 500
f;
38820 }
38821 velocity =
new Vector2(0
f, (
float)
Math.Sin((
float)
Math.PI * 2
f *
this.ai[0] / 180
f) * 0.15f);
38822 this.ai[0]++;
38823 if (this.ai[0] >= 180
f)
38824 {
38826 }
38827 }
38829 {
38830 return;
38831 }
38832 Color
newColor3 = Main.hslToRgb(this.ai[0], 1
f, 0.5
f);
38833 int num958 = (int)this.ai[1];
38835 {
38837 }
38838 else
38839 {
38840 DelegateMethods.v3_1 = ((Color)(
ref newColor3)).ToVector3() * 0.5f;
38841 Utils.PlotTileLine(
base.Center, Main.projectile[
num958].Center, 8
f, DelegateMethods.CastLight);
38842 }
38844 {
38845 localAI[0] = Main.rand.NextFloat() * 0.8f + 0.8f;
38846 direction = ((Main.rand.Next(2) > 0) ? 1 : (-1));
38847 }
38850 {
38852 }
38854 {
38856 }
38858 {
38859 Lighting.AddLight(
base.Center, ((Color)(
ref newColor3)).ToVector3() * 0.5f);
38860 }
38862 {
38863 if (Main.rand.Next(10) == 0)
38864 {
38865 Vector2
unitY8 = Vector2.UnitY;
38867 val4 =
default(Vector2);
38870 val4 =
default(Vector2);
38873 dust187.noGravity = true;
38874 dust187.noLight = true;
38876 dust187.position =
base.Center;
38877 dust187.velocity =
vector40 * 2.5f;
38878 }
38879 }
38881 {
38882 if (Main.rand.Next(10) == 0)
38883 {
38884 Vector2
unitY9 = Vector2.UnitY;
38886 val4 =
default(Vector2);
38889 dust188.noGravity = true;
38890 dust188.noLight = true;
38892 dust188.position =
base.Center;
38893 dust188.velocity =
vector41 * 2.5f;
38894 }
38895 }
38896 if (Main.rand.Next(10) == 0)
38897 {
38898 float num961 = 1
f + Main.rand.NextFloat() * 2
f;
38899 float fadeIn = 1
f + Main.rand.NextFloat();
38900 float num962 = 1
f + Main.rand.NextFloat();
38901 Vector2
vector42 = Utils.RandomVector2(Main.rand, -1
f, 1
f);
38903 {
38905 }
38906 vector42 *= 20
f + Main.rand.NextFloat() * 100
f;
38908 Point
point3 =
vec.ToTileCoordinates();
38911 {
38913 }
38915 {
38917 }
38919 {
38921 dust189.noGravity = true;
38922 dust189.position =
vec;
38923 dust189.velocity = -Vector2.UnitY *
num961 * (Main.rand.NextFloat() * 0.9f + 1.6f);
38924 dust189.fadeIn = fadeIn;
38926 dust189.noLight = true;
38927 if (
dust189.dustIndex != 6000)
38928 {
38932 dust212.scale *= 0.65f;
38935 dust212.fadeIn *= 0.65f;
38936 dust190.color = new Color(255, 255, 255, 255);
38937 }
38938 }
38939 }
38944 {
38946 }
38948 {
38950 if (Main.myPlayer ==
owner)
38951 {
38956 base.position =
base.Center;
38958 base.Center =
base.position;
38963 base.position =
base.Center;
38966 base.Center =
base.position;
38968 }
38969 }
38970 }
38972 {
38975 {
38977 }
38979 {
38981 }
38983 {
38985 }
38986 if (this.ai[0] == 0
f)
38987 {
38989 {
38990 int num969 = (int)this.ai[1];
38991 if (!Main.npc[
num969].CanBeChasedBy(
this))
38992 {
38994 return;
38995 }
38999 {
39002 }
39005 }
39006 else
39007 {
39008 this.ai[1]++;
39009 if (this.ai[1] >= 45
f)
39010 {
39014 {
39017 }
39021 }
39023 }
39024 }
39025 if (this.ai[0] == 1
f)
39026 {
39032 {
39034 }
39036 {
39038 }
39040 {
39042 }
39047 {
39049 }
39050 int num975 = (int)this.ai[1];
39052 {
39054 }
39056 {
39058 }
39059 else if (Main.npc[
num975].active && !Main.npc[
num975].dontTakeDamage)
39060 {
39064 {
39065 Main.npc[
num975].HitEffect(0, 1.0);
39066 }
39067 }
39068 else
39069 {
39071 }
39073 {
39075 }
39077 {
39079 {
39081 Vector2
value8 = Main.npc[
num975].velocity +
new Vector2(Main.rand.NextFloatDirection() * 0.35f, 2.5f);
39083 dust191.fadeIn = 0.25f;
39084 dust191.noGravity = true;
39085 }
39087 {
39090 }
39091 }
39093 {
39095 {
39097 Vector2
vector47 =
velocity.SafeNormalize(Vector2.Zero) * -7
f +
velocity.SafeNormalize(Vector2.Zero).RotatedByRandom(0.19634954631328583);
39098 Dust
dust192 = Dust.NewDustPerfect(
vector45, 5, Vector2.Zero, 0,
default(Color), 1.5f);
39099 dust192.scale = 1.1f;
39100 dust192.velocity =
vector47 * 0.85f +
new Vector2(0
f, 0.85
f);
39103 double radians54 = (float)
Math.PI * 2
f * Main.rand.NextFloatDirection() * 0.025f;
39104 val4 =
default(Vector2);
39108 double radians55 = (float)
Math.PI * 2
f * Main.rand.NextFloatDirection() * 0.025f;
39109 val4 =
default(Vector2);
39113 dust212.position +=
dust192.velocity;
39114 if (Main.rand.Next(3) == 0)
39115 {
39117 dust192.velocity =
dust192.velocity.RotatedByRandom(0.39269909262657166) * 0.9f;
39118 }
39119 }
39121 {
39126 {
39127 Vector2
vector49 = Main.rand.NextVector2CircularEdge(4
f, 4
f);
39128 Dust
dust193 = Dust.NewDustPerfect(
vector48, 5, Vector2.Zero, 0,
default(Color), 1.5f);
39129 dust193.scale = 1.5f;
39131 dust193.noGravity = true;
39132 }
39133 }
39134 }
39135 }
39137 {
39138 Lighting.AddLight(
base.Center, 0.2f, 0.6f, 0.7f);
39139 }
39141 {
39142 Lighting.AddLight(
base.Center, 0.8f, 0.7f, 0.4f);
39143 }
39144 }
39146 {
39147 if (Main.netMode == 2 &&
localAI[0] == 0
f)
39148 {
39151 }
39155 {
39157 }
39158 if (!
flag50 && !
WorldGen.InWorld((
int)
base.Center.X / 16, (
int)
base.Center.Y / 16, Lighting.OffScreenTiles))
39159 {
39161 }
39163 {
39165 }
39167 {
39169 return;
39170 }
39174 {
39176 }
39178 {
39180 }
39182 {
39185 {
39187 }
39188 }
39190 }
39192 {
39193 Lighting.AddLight(
base.Center,
new Vector3(0.075
f, 0.3
f, 0.15
f));
39197 {
39199 }
39200 else
39201 {
39203 }
39205 if (this.ai[1] > 30
f)
39206 {
39209 {
39212 }
39213 }
39214 }
39216 {
39218 {
39221 }
39224 {
39226 }
39227 float angle = (float)
player2.miscCounter / 300
f * ((
float)Math.PI * 4
f) + this.ai[1];
39232 {
39234 }
39236 base.Center = player2.Center -
velocity;
39237 }
39239 {
39240 this.ai[1] += 0.01f;
39241 scale = this.ai[1];
39242 this.ai[0]++;
39243 if (this.ai[0] >= (
float)(3 * Main.projFrames[
type]))
39244 {
39246 return;
39247 }
39249 {
39252 {
39254 }
39255 }
39258 {
39260 }
39264 {
39265 Lighting.AddLight(
base.Center, 0.9f, 0.8f, 0.6f);
39266 }
39267 if (this.ai[0] != 1
f)
39268 {
39269 return;
39270 }
39271 base.position =
base.Center;
39273 base.Center =
base.position;
39276 {
39279 {
39281 Main.dust[
num979].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)
width / 2
f;
39282 }
39284 {
39286 Main.dust[
num981].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)
width / 2
f;
39287 Main.dust[
num981].noGravity =
true;
39290 dust212.velocity *= 3
f;
39292 Main.dust[
num981].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)
width / 2
f;
39295 dust212.velocity *= 2
f;
39296 Main.dust[
num981].noGravity =
true;
39297 Main.dust[
num981].fadeIn = 2.5f;
39298 }
39300 {
39304 Vector2
spinningpoint67 = Vector2.UnitX.RotatedByRandom(3.1415927410125732);
39306 val4 =
default(Vector2);
39308 Main.dust[
num983].noGravity =
true;
39311 dust212.velocity *= 3
f;
39312 }
39314 {
39318 Vector2
spinningpoint68 = Vector2.UnitX.RotatedByRandom(3.1415927410125732);
39320 val4 =
default(Vector2);
39322 Main.dust[
num985].noGravity =
true;
39325 dust212.velocity *= 3
f;
39326 }
39327 }
39329 {
39330 return;
39331 }
39334 {
39336 Main.dust[
num987].position = base.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)
width / 2
f;
39339 dust212.velocity *= 2
f;
39340 Main.dust[
num987].noGravity =
true;
39341 Main.dust[
num987].fadeIn = 2.5f;
39343 }
39345 {
39349 Vector2
spinningpoint69 = Vector2.UnitX.RotatedByRandom(3.1415927410125732);
39351 val4 =
default(Vector2);
39353 Main.dust[
num990].noGravity =
true;
39356 dust212.velocity *= 3
f;
39358 }
39359 float num991 = (float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f);
39360 float num992 = (float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f);
39361 float num993 = (float)Main.rand.NextDouble() * ((float)
Math.PI * 2
f);
39362 float num994 = 7
f + (float)Main.rand.NextDouble() * 7
f;
39363 float num995 = 7
f + (float)Main.rand.NextDouble() * 7
f;
39364 float num996 = 7
f + (float)Main.rand.NextDouble() * 7
f;
39367 {
39369 }
39371 {
39373 }
39375 {
39379 {
39381 }
39383 {
39385 }
39387 {
39389 }
39396 {
39397 vector50.Y *= 0.5f;
39400 val4 =
default(Vector2);
39402 }
39404 {
39405 vector50.X *= 0.5f;
39408 val4 =
default(Vector2);
39410 }
39412 {
39413 vector50.Y *= 0.5f;
39416 val4 =
default(Vector2);
39418 }
39421 dust212.velocity *= 0.2f;
39427 {
39429 Main.dust[
num1002].noGravity =
true;
39430 Main.dust[
num1002].fadeIn = Main.rand.NextFloat() * 2
f;
39431 if (Main.rand.Next(4) == 0)
39432 {
39433 Main.dust[
num1002].fadeIn = 2.5f;
39434 }
39435 Main.dust[
num1002].noLight =
true;
39437 {
39440 dust212.position += Main.dust[
num1002].velocity * 20
f;
39443 dust212.velocity *= -1
f;
39444 }
39445 }
39446 }
39447 }
39449 {
39450 this.ai[0]++;
39453 {
39455 }
39458 {
39460 }
39462 {
39463 case 0:
39465 if (Main.rand.Next(3) == 0)
39466 {
39467 if (Main.rand.Next(2) == 0)
39468 {
39469 Vector2
vector56 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39470 Dust
dust197 = Main.dust[Dust.NewDust(
base.Center -
vector56 * 30
f, 0, 0, Utils.SelectRandom<
int>(Main.rand, 86, 90))];
39471 dust197.noGravity = true;
39472 dust197.position = base.Center -
vector56 * (float)Main.rand.Next(10, 21);
39473 val4 =
default(Vector2);
39474 dust197.velocity =
vector56.RotatedBy(1.5707963705062866,
val4) * 6
f;
39475 dust197.scale = 0.5f + Main.rand.NextFloat();
39476 dust197.fadeIn = 0.5f;
39477 dust197.customData = this;
39478 }
39479 else
39480 {
39481 Vector2
vector58 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39483 dust198.noGravity = true;
39484 dust198.position = base.Center -
vector58 * 30
f;
39485 val4 =
default(Vector2);
39486 dust198.velocity =
vector58.RotatedBy(-1.5707963705062866,
val4) * 3
f;
39487 dust198.scale = 0.5f + Main.rand.NextFloat();
39488 dust198.fadeIn = 0.5f;
39489 dust198.customData = this;
39490 }
39491 }
39492 if (this.ai[0] >= 30
f)
39493 {
39495 scale += 0.0074468083f;
39497 {
39499 }
39501 }
39503 {
39507 }
39508 break;
39509 case 1:
39510 {
39513 {
39514 if (Main.rand.Next(2) == 0)
39515 {
39516 Vector2
vector51 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39518 dust195.noGravity = true;
39519 dust195.position = base.Center -
vector51 * (float)Main.rand.Next(10, 21);
39522 val4 =
default(Vector2);
39524 dust195.scale = 0.9f + Main.rand.NextFloat();
39525 dust195.fadeIn = 0.5f;
39526 dust195.customData = this;
39527 vector51 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39529 dust195.noGravity = true;
39530 dust195.position = base.Center -
vector51 * (float)Main.rand.Next(10, 21);
39533 val4 =
default(Vector2);
39535 dust195.scale = 0.9f + Main.rand.NextFloat();
39536 dust195.fadeIn = 0.5f;
39537 dust195.customData = this;
39538 dust195.color = Color.Crimson;
39539 }
39540 else
39541 {
39542 Vector2
vector52 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39544 dust196.noGravity = true;
39545 dust196.position = base.Center -
vector52 * (float)Main.rand.Next(20, 31);
39546 val4 =
default(Vector2);
39547 dust196.velocity =
vector52.RotatedBy(-1.5707963705062866,
val4) * 5
f;
39548 dust196.scale = 0.9f + Main.rand.NextFloat();
39549 dust196.fadeIn = 0.5f;
39550 dust196.customData = this;
39551 }
39552 }
39553 if (this.ai[0] % 30
f == 0
f && this.ai[0] < 241
f && Main.myPlayer ==
owner)
39554 {
39555 Vector2
vector53 = Vector2.UnitY.RotatedByRandom(6.2831854820251465) * 12
f;
39556 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector53.X,
vector53.Y, 618,
damage / 2, 0
f,
owner, 0
f,
whoAmI);
39557 }
39562 if (this.ai[1] == 0
f)
39563 {
39565 {
39566 if (Main.npc[
num1007].CanBeChasedBy(
this))
39567 {
39570 {
39575 }
39576 }
39577 }
39579 {
39580 if (this.ai[1] != (
float)(
num1006 + 1))
39581 {
39583 }
39585 }
39587 }
39588 if (this.ai[1] != 0
f)
39589 {
39590 int num1008 = (int)(this.ai[1] - 1
f);
39592 {
39595 }
39596 }
39598 {
39600 }
39602 {
39605 Vector2
vector55 =
default(Vector2);
39616 }
39617 break;
39618 }
39619 }
39621 {
39622 Lighting.AddLight(
base.Center, 0.7f, 0.2f, 0.6f);
39623 }
39624 if (this.ai[0] >= 600
f)
39625 {
39627 }
39628 }
39630 {
39639 {
39644 }
39646 {
39647 int num1018 = (int)this.ai[1];
39649 {
39651 return;
39652 }
39654 }
39655 this.ai[0]++;
39657 {
39658 return;
39659 }
39661 int num1019 = (int)this.ai[1];
39663 {
39664 if (!
flag54 && Main.projectile[
num1019].oldPos[1] != Vector2.Zero)
39665 {
39666 base.position += Main.projectile[
num1019].position - Main.projectile[
num1019].oldPos[1];
39667 }
39668 if (
base.Center.HasNaNs())
39669 {
39671 return;
39672 }
39673 }
39674 else
39675 {
39679 }
39681 {
39684 {
39686 }
39687 }
39689 {
39690 if (Main.rand.Next(2) == 0)
39691 {
39692 int num1020 = Dust.NewDust(
base.Center, 8, 8, 86);
39695 Main.dust[
num1020].noGravity =
true;
39696 Main.dust[
num1020].scale = 1.5f;
39698 {
39699 Main.dust[
num1020].customData = Main.projectile[(int)this.ai[1]];
39700 }
39701 }
39703 }
39704 else
39705 {
39707 }
39708 }
39710 {
39712 }
39714 {
39716 }
39718 {
39719 int num1022 = (int)this.ai[0];
39722 {
39724 }
39726 {
39728 {
39730 return;
39731 }
39732 if (
type == 631 && this.ai[0] != -1
f)
39733 {
39736 }
39737 }
39739 {
39742 {
39745 {
39748 }
39749 return;
39750 }
39751 }
39753 {
39756 Dust.QuickDust(
base.Center, Color.Red);
39757 }
39759 {
39760 return;
39761 }
39762 if (this.ai[1] > 0
f)
39763 {
39764 this.ai[1]--;
39766 return;
39767 }
39769 {
39771 {
39773 }
39777 {
39779 }
39780 }
39781 else
39782 {
39787 {
39789 }
39790 }
39792 }
39794 {
39800 {
39803 {
39805 }
39807 {
39809 }
39812 Lighting.AddLight(
base.Center,
new Vector3(0.3
f, 0.9
f, 0.7
f) *
Opacity);
39813 if (Main.rand.Next(2) == 0)
39814 {
39815 Vector2
vector59 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39817 dust199.noGravity = true;
39818 dust199.position = base.Center -
vector59 * (float)Main.rand.Next(10, 21);
39819 val4 =
default(Vector2);
39820 dust199.velocity =
vector59.RotatedBy(1.5707963705062866,
val4) * 6
f;
39821 dust199.scale = 0.5f + Main.rand.NextFloat();
39822 dust199.fadeIn = 0.5f;
39823 dust199.customData =
base.Center;
39824 }
39825 if (Main.rand.Next(2) == 0)
39826 {
39827 Vector2
vector60 = Vector2.UnitY.RotatedByRandom(6.2831854820251465);
39829 dust200.noGravity = true;
39830 dust200.position = base.Center -
vector60 * 30
f;
39831 val4 =
default(Vector2);
39832 dust200.velocity =
vector60.RotatedBy(-1.5707963705062866,
val4) * 3
f;
39833 dust200.scale = 0.5f + Main.rand.NextFloat();
39834 dust200.fadeIn = 0.5f;
39835 dust200.customData =
base.Center;
39836 }
39837 if (this.ai[0] < 0
f)
39838 {
39843 dust212.velocity *= 2
f;
39844 Main.dust[
num1024].noGravity =
true;
39845 Main.dust[
num1024].scale = Utils.SelectRandom<
float>(Main.rand, 0.8f, 1.65f);
39846 Main.dust[
num1024].customData =
this;
39847 }
39848 }
39850 {
39853 {
39855 }
39857 {
39859 }
39861 {
39864 {
39866 }
39867 }
39868 if (
alpha == 0 && Main.rand.Next(15) == 0)
39869 {
39870 Dust
dust201 = Main.dust[Dust.NewDust(
base.Top, 0, 0, 261, 0
f, 0
f, 100)];
39871 dust201.velocity.X = 0
f;
39872 dust201.noGravity = true;
39873 dust201.fadeIn = 1
f;
39874 dust201.position = base.Center + Vector2.UnitY.RotatedByRandom(6.2831854820251465) * (4
f * Main.rand.NextFloat() + 26
f);
39875 dust201.scale = 0.5f;
39876 }
39879 {
39881 }
39882 }
39883 if (this.ai[0] < 0
f)
39884 {
39885 this.ai[0]++;
39887 {
39888 this.ai[1] -= (float)
direction * ((
float)Math.PI / 8
f) / 50
f;
39889 }
39890 }
39891 if (this.ai[0] == 0
f)
39892 {
39897 {
39900 {
39903 }
39904 }
39906 {
39908 {
39910 if (
nPC7.CanBeChasedBy(
this))
39911 {
39914 {
39917 }
39918 }
39919 }
39920 }
39922 {
39926 return;
39927 }
39928 }
39929 if (!(this.ai[0] > 0
f))
39930 {
39931 return;
39932 }
39933 int num1030 = (int)this.ai[1];
39934 if (!Main.npc[
num1030].CanBeChasedBy(
this))
39935 {
39939 return;
39940 }
39941 this.ai[0]++;
39944 {
39946 }
39948 {
39950 }
39951 if (!(this.ai[0] >=
num1031))
39952 {
39953 return;
39954 }
39957 {
39959 }
39961 int num1034 = ((vector61.X > 0
f) ? 1 : (-1));
39963 {
39968 if (
owner == Main.myPlayer)
39969 {
39970 NewProjectile(
GetProjectileSource_FromThis(),
base.Center.X,
base.Center.Y,
vector61.X,
vector61.Y, 642,
damage,
knockBack,
owner,
this.ai[1],
whoAmI);
39971 }
39972 }
39974 {
39975 return;
39976 }
39980 if (
owner != Main.myPlayer)
39981 {
39982 return;
39983 }
39985 Vector2
vector62 = nPC8.position + nPC8.Size * Utils.RandomVector2(Main.rand, 0
f, 1
f) -
base.Center;
39987 {
39989 Vector2
vector63 = nPC8.velocity * 30
f;
39993 {
39994 other = base.Center +
vector62.RotatedByRandom(0.7853981852531433) * (Main.rand.NextFloat() *
num1036 + 0.5f);
39995 }
39996 float x8 = Main.rgbToHsl(
new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB)).X;
39997 NewProjectile(
GetProjectileSource_FromThis(),
other.X,
other.Y, 0
f, 0
f, 644,
damage,
knockBack,
owner,
x8,
whoAmI);
39998 }
39999 }
40001 {
40005 {
40007 return;
40008 }
40009 if (
type == 650 &&
player3.suspiciouslookingTentacle)
40010 {
40012 }
40013 if (
type == 882 &&
player3.petFlagEyeOfCthulhuPet)
40014 {
40016 }
40018 {
40020 }
40022 {
40024 }
40026 {
40028 }
40030 {
40032 }
40034 {
40036 }
40039 {
40040 Vector3
v3_ =
new Vector3(0.5
f, 0.9
f, 1
f) * 2
f;
40041 DelegateMethods.v3_1 =
v3_;
40042 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6
f, 20
f, DelegateMethods.CastLightOpen);
40043 Utils.PlotTileLine(
base.Left,
base.Right, 20
f, DelegateMethods.CastLightOpen);
40044 Utils.PlotTileLine(
player3.Center,
player3.Center +
player3.velocity * 6
f, 40
f, DelegateMethods.CastLightOpen);
40045 Utils.PlotTileLine(
player3.Left,
player3.Right, 40
f, DelegateMethods.CastLightOpen);
40046 }
40048 {
40049 Vector3
vector64 =
new Vector3(1
f, 0.6
f, 1
f) * 1.5f;
40050 DelegateMethods.v3_1 =
vector64 * 0.75f;
40051 Utils.PlotTileLine(
player3.Center,
player3.Center +
player3.velocity * 6
f, 40
f, DelegateMethods.CastLightOpen);
40052 Utils.PlotTileLine(
player3.Left,
player3.Right, 40
f, DelegateMethods.CastLightOpen);
40053 DelegateMethods.v3_1 =
vector64 * 1.5f;
40054 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6
f, 30
f, DelegateMethods.CastLightOpen);
40055 Utils.PlotTileLine(
base.Left,
base.Right, 20
f, DelegateMethods.CastLightOpen);
40056 }
40058 {
40059 Vector3
vector65 =
new Vector3(1
f, 0.7
f, 0.05
f) * 1.5f;
40060 DelegateMethods.v3_1 =
vector65 * 0.75f;
40061 Utils.PlotTileLine(
player3.Center,
player3.Center +
player3.velocity * 6
f, 40
f, DelegateMethods.CastLightOpen);
40062 Utils.PlotTileLine(
player3.Left,
player3.Right, 40
f, DelegateMethods.CastLightOpen);
40063 DelegateMethods.v3_1 =
vector65 * 1.5f;
40064 Utils.PlotTileLine(
base.Center,
base.Center +
velocity * 6
f, 30
f, DelegateMethods.CastLightOpen);
40065 Utils.PlotTileLine(
base.Left,
base.Right, 20
f, DelegateMethods.CastLightOpen);
40066 }
40070 if (
type == 882 &&
player3.ownedProjectileCounts[650] > 0)
40071 {
40073 }
40075 {
40078 if (
player3.ownedProjectileCounts[650] > 0)
40079 {
40081 }
40082 }
40084 {
40087 }
40089 {
40092 if (
player3.ownedProjectileCounts[888] > 0)
40093 {
40095 }
40096 }
40098 {
40101 if (
player3.ownedProjectileCounts[895] > 0)
40102 {
40104 }
40105 }
40107 {
40110 if (
player3.ownedProjectileCounts[895] > 0)
40111 {
40113 }
40114 }
40115 Vector2
vector66 =
default(Vector2);
40120 {
40121 base.Center = player3.Center +
vector66;
40122 }
40126 {
40128 }
40130 {
40132 {
40134 }
40135 else
40136 {
40138 }
40139 }
40141 {
40144 {
40146 }
40147 }
40149 {
40151 {
40154 {
40156 {
40158 }
40159 else
40160 {
40162 }
40163 }
40167 {
40170 {
40172 }
40173 }
40174 }
40175 else if (
type == 882)
40176 {
40179 {
40182 {
40184 }
40185 else
40186 {
40189 {
40191 }
40192 }
40193 }
40194 }
40195 else if (
type == 888)
40196 {
40199 {
40201 {
40203 }
40204 else
40205 {
40207 }
40208 }
40212 {
40215 {
40217 }
40218 else
40219 {
40222 {
40224 }
40225 }
40226 }
40227 }
40228 else if (
type == 895)
40229 {
40230 float num1046 = velocity.X * 0.1f;
40232 {
40234 {
40236 }
40237 else
40238 {
40240 }
40241 }
40245 {
40249 {
40251 }
40252 }
40254 {
40256 Main.dust[
num1048].noGravity =
true;
40257 }
40258 }
40259 else if (
type == 896)
40260 {
40263 {
40265 {
40267 }
40268 else
40269 {
40271 }
40272 }
40276 {
40279 {
40281 }
40282 else
40283 {
40286 {
40288 }
40289 }
40290 }
40291 }
40292 else if (
type == 898)
40293 {
40294 float num1051 = velocity.X * 0.1f;
40296 {
40298 {
40300 }
40301 else
40302 {
40304 }
40305 }
40309 {
40313 {
40315 }
40316 }
40318 {
40320 Main.dust[
num1053].noGravity =
true;
40321 }
40322 }
40323 else if (
type == 957)
40324 {
40325 float num1055 = velocity.X * 0.05f;
40327 {
40329 {
40331 }
40332 else
40333 {
40335 }
40336 }
40340 {
40343 if (
frame >= Main.projFrames[
type] * 2)
40344 {
40346 }
40347 }
40348 }
40349 }
40350 else if (
type == 650)
40351 {
40353 {
40355 }
40357 {
40359 }
40360 else
40361 {
40363 }
40365 {
40368 {
40370 }
40371 }
40372 }
40373 else if (
type == 882)
40374 {
40377 {
40381 {
40383 }
40384 }
40385 }
40386 else if (
type == 888)
40387 {
40389 {
40391 }
40393 {
40395 }
40396 else
40397 {
40399 }
40401 {
40405 {
40407 }
40408 }
40409 }
40410 else if (
type == 895)
40411 {
40413 {
40415 }
40417 {
40419 }
40420 else
40421 {
40423 }
40425 {
40429 {
40431 }
40432 }
40433 }
40434 else if (
type == 896)
40435 {
40437 {
40439 }
40441 {
40443 }
40444 else
40445 {
40447 }
40449 {
40453 {
40455 if (Main.rand.Next(15) == 0)
40456 {
40458 }
40459 }
40460 }
40461 }
40462 else if (
type == 898)
40463 {
40465 {
40467 }
40469 {
40471 }
40472 else
40473 {
40475 }
40477 {
40481 {
40483 }
40484 }
40485 }
40486 else if (
type == 957)
40487 {
40490 {
40492 }
40494 {
40496 }
40497 else
40498 {
40500 }
40502 {
40508 {
40510 {
40512 break;
40513 }
40516 {
40518 break;
40519 }
40521 }
40523 {
40526 {
40529 {
40531 }
40534 {
40536 }
40538 {
40542 {
40543 localAI[0] = 200 + Main.rand.Next(150);
40545 }
40547 {
40549 }
40550 }
40551 }
40553 {
40557 {
40559 }
40560 }
40561 }
40562 else
40563 {
40566 {
40570 {
40572 }
40573 }
40574 }
40575 }
40576 else
40577 {
40580 {
40584 {
40586 }
40587 }
40588 }
40589 }
40590 if (
flag61 && this.ai[0] > 0
f && (this.ai[0] += 1
f) >= 60
f)
40591 {
40594 }
40595 if (
flag61 && Main.rand.Next(15) == 0)
40596 {
40602 if (((Vector2)(
ref val4)).Length() < (
float)Main.screenWidth)
40603 {
40609 {
40611 {
40612 int num1072 = Main.rand.Next(8);
40614 {
40615 continue;
40616 }
40619 {
40622 {
40628 }
40630 {
40631 int num1074 = Dust.NewDust(
new Vector2((
float)(
num1070 * 16), (
float)(
num1071 * 16)), 16, 16, 204, 0
f, 0
f, 150,
default(Color), 0.3
f);
40632 Main.dust[
num1074].fadeIn = 0.75f;
40635 dust212.velocity *= 0.1f;
40636 }
40637 }
40638 }
40639 }
40640 }
40641 }
40643 {
40644 return;
40645 }
40649 {
40651 }
40653 float max = 0.999f;
40663 {
40665 if (!
nPC9.active || !
nPC9.chaseable ||
nPC9.dontTakeDamage ||
nPC9.immortal)
40666 {
40667 continue;
40668 }
40670 if (
nPC9.friendly ||
nPC9.lifeMax <= 5)
40671 {
40673 {
40676 }
40677 }
40679 {
40682 }
40683 }
40685 {
40690 }
40691 else if (
num7 != -1)
40692 {
40697 }
40698 else if (
num8 != -1)
40699 {
40704 }
40705 else if (this.ai[0] > 0
f)
40706 {
40711 if (Main.rand.Next(10) == 0)
40712 {
40713 int num13 = Dust.NewDust(
base.Center +
f3.ToRotationVector2() * 6
f *
num1075 - Vector2.One * 4
f, 8, 8, 204, 0
f, 0
f, 150,
default(Color), 0.3f);
40714 Main.dust[
num13].fadeIn = 0.75f;
40717 dust212.velocity *= 0.1f;
40718 }
40719 }
40720 else
40721 {
40722 num5 = ((player3.direction == 1) ? 0
f : 3.1416028
f);
40726 }
40731 }
40733 {
40735 if (Main.myPlayer ==
owner)
40736 {
40738 {
40740 }
40742 {
40744 }
40745 else if (Main.mouseRight && Main.mouseRightRelease)
40746 {
40748 player4.mouseInterface = true;
40749 Main.blockMouse = true;
40750 }
40752 {
40754 {
40756 }
40758 }
40760 {
40761 Vector2
vector70 = Main.screenPosition +
new Vector2((
float)Main.mouseX, (
float)Main.mouseY);
40763 {
40764 vector70.Y = (float)(Main.screenHeight - Main.mouseY) + Main.screenPosition.Y;
40765 }
40767 {
40771 }
40772 if (this.ai[0] == 0
f && this.ai[1] == 0
f)
40773 {
40774 this.ai[0] = (int)
base.Center.X / 16;
40775 this.ai[1] = (int)
base.Center.Y / 16;
40778 }
40779 }
40781 Point
point4 = Utils.ToPoint(
new Vector2(this.ai[0], this.ai[1]));
40782 Point
point5 =
base.Center.ToTileCoordinates();
40787 Point
point6 =
default(Point);
40789 bool flag66 = player4.direction == 1;
40794 {
40799 }
40800 else
40801 {
40806 }
40808 {
40810 {
40811 break;
40812 }
40814 {
40816 }
40817 else
40818 {
40820 }
40822 {
40824 }
40825 }
40827 {
40832 }
40833 else
40834 {
40839 }
40841 {
40843 {
40844 break;
40845 }
40847 {
40849 }
40850 else
40851 {
40853 }
40855 {
40857 }
40858 }
40859 }
40862 {
40864 }
40865 player4.heldProj =
whoAmI;
40867 player4.itemRotation = 0
f;
40868 }
40870 {
40873 if (this.ai[0] == 0
f)
40874 {
40876 {
40881 }
40882 this.ai[1]++;
40883 if (this.ai[1] >= 60
f)
40884 {
40886 }
40888 {
40890 Main.dust[
num29].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f;
40891 Main.dust[
num29].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f;
40892 Main.dust[
num29].noGravity =
true;
40897 val4 =
default(Vector2);
40899 }
40900 }
40901 if (this.ai[0] != 1
f)
40902 {
40903 return;
40904 }
40907 {
40911 {
40913 }
40915 {
40916 }
40918 {
40919 base.position.Y +=
height;
40921 base.position.Y -=
num30;
40922 }
40923 else
40924 {
40926 }
40927 }
40928 this.ai[1]++;
40930 {
40932 {
40937 }
40938 else
40939 {
40943 }
40944 }
40945 if (this.ai[1] >= 60
f)
40946 {
40948 }
40950 {
40953 {
40954 int num37 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
40956 Main.dust[
num38].alpha = 200;
40959 dust212.velocity *=
new Vector2(0.3
f, 2
f);
40963 dust212.scale += Main.rand.NextFloat();
40966 if (
num26 == -1 && Main.rand.Next(4) != 0)
40967 {
40968 Main.dust[
num38].velocity.Y -= 0.2f;
40969 }
40970 }
40972 }
40974 {
40976 {
40977 int num40 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
40979 Main.dust[
num41].alpha = 200;
40982 dust212.velocity *=
new Vector2(0.3
f, 2
f);
40986 dust212.scale += Main.rand.NextFloat();
40989 if (
num26 == -1 && Main.rand.Next(4) != 0)
40990 {
40991 Main.dust[
num41].velocity.Y -= 0.2f;
40992 }
40993 }
40994 }
40995 int num42 = (int)(this.ai[1] / 60
f * (
float)
height) * 3;
40997 {
40999 }
41001 Vector2
vector72 = base.position + (Vector2)((
num26 == -1) ?
new Vector2(0
f, (
float)
height) : Vector2.Zero);
41003 {
41004 if (Main.rand.Next(3) < 2)
41005 {
41007 Main.dust[
num44].noGravity =
true;
41008 Main.dust[
num44].fadeIn = 1
f;
41009 if (Main.dust[
num44].velocity.Y > 0
f)
41010 {
41011 Main.dust[
num44].velocity.Y *= -1
f;
41012 }
41013 if (Main.rand.Next(6) < 3)
41014 {
41018 dust212.velocity *= 5
f;
41019 Main.dust[
num44].velocity.Y -= 3
f;
41020 Main.dust[
num44].position.X =
base.Center.X;
41021 Main.dust[
num44].noGravity =
false;
41022 Main.dust[
num44].noLight =
true;
41023 Main.dust[
num44].fadeIn = 0.4f;
41026 dust212.scale *= 0.3f;
41027 }
41028 else
41029 {
41031 }
41034 }
41035 }
41037 {
41038 if (!(Main.rand.NextFloat() < 0.5f))
41039 {
41040 int num46 = Utils.SelectRandom<
int>(Main.rand, 6, 259, 158);
41042 Main.dust[
num48].alpha = 200;
41045 dust212.velocity *=
new Vector2(0.6
f, 1.5
f);
41048 dust212.scale += Main.rand.NextFloat();
41049 if (
num26 == -1 && Main.rand.Next(4) != 0)
41050 {
41051 Main.dust[
num48].velocity.Y -= 0.2f;
41052 }
41054 }
41055 }
41056 }
41058 {
41061 {
41063 }
41065 {
41068 }
41069 this.ai[0]++;
41070 if (this.ai[0] >=
num49)
41071 {
41073 }
41075 {
41077 if (this.ai[0] <
num49 - 120
f)
41078 {
41079 float num50 = this.ai[0] % 60
f;
41082 }
41083 }
41086 Point
point7 =
base.Center.ToTileCoordinates();
41093 Vector2
vector74 =
default(Vector2);
41095 vector74.X = vector74.Y * 0.2f;
41099 if (
type == 656 &&
owner == Main.myPlayer)
41100 {
41103 Vector2 top = Main.player[
owner].Top;
41105 {
41107 if (Collision.CanHitLine(
position, 0, 0,
center13, 0, 0) || Collision.CanHitLine(
position, 0, 0, top, 0, 0))
41108 {
41110 break;
41111 }
41112 }
41114 {
41115 float num54 = this.ai[0] % 60
f;
41118 }
41119 }
41120 if (!(this.ai[0] <
num49 - 120
f))
41121 {
41122 return;
41123 }
41124 Vector2
vector75 =
default(Vector2);
41125 Vector2
vector76 =
default(Vector2);
41127 {
41130 float amount3 = Main.rand.NextFloat();
41139 dust202.fadeIn = 1
f;
41140 dust202.scale = 0.3f;
41142 {
41143 dust202.velocity.X = 1
f + Main.rand.NextFloat();
41144 }
41145 dust202.velocity.Y = Main.rand.NextFloat() * -0.5f - 1
f;
41146 }
41147 }
41149 {
41153 {
41156 }
41158 {
41159 Vector2
vector78 =
default(Vector2);
41160 Vector2
vector80 =
default(Vector2);
41162 {
41165 float amount4 = Main.rand.NextFloat();
41173 dust203.customData = base.Center +
vector80;
41174 dust203.fadeIn = 1
f;
41175 dust203.scale = 0.3f;
41177 {
41178 dust203.velocity.X = 1
f + Main.rand.NextFloat();
41179 }
41180 dust203.velocity.Y = Main.rand.NextFloat() * -0.5f - 1
f;
41181 }
41182 }
41184 {
41187 Point
point8 =
base.Center.ToTileCoordinates();
41188 base.Center =
new Vector2((
float)(
point8.X * 16 + 8), (
float)(
point8.Y * 16 + 8));
41189 }
41192 {
41194 {
41196 }
41198 {
41200 }
41201 }
41203 {
41205 {
41207 }
41209 {
41211 }
41212 }
41214 {
41215 Lighting.AddLight(
base.Center, ((Color)(
ref newColor4)).ToVector3() * 0.5f);
41216 }
41218 {
41219 if (Main.rand.Next(10) == 0)
41220 {
41221 Vector2
unitY10 = Vector2.UnitY;
41223 val4 =
default(Vector2);
41226 val4 =
default(Vector2);
41229 dust204.noGravity = true;
41230 dust204.noLight = true;
41232 dust204.position =
base.Center;
41233 dust204.velocity =
vector82 * 2.5f;
41234 }
41235 }
41237 {
41238 if (Main.rand.Next(10) == 0)
41239 {
41240 Vector2
unitY11 = Vector2.UnitY;
41242 val4 =
default(Vector2);
41245 dust206.noGravity = true;
41246 dust206.noLight = true;
41248 dust206.position =
base.Center;
41249 dust206.velocity =
vector83 * 2.5f;
41250 }
41251 }
41253 {
41255 }
41259 {
41261 if (Main.expertMode)
41262 {
41264 }
41266 }
41268 {
41270 }
41271 }
41273 {
41280 {
41287 {
41289 }
41290 if (
localAI[0] == 0
f && this.ai[0] < 0
f &&
owner == Main.myPlayer)
41291 {
41294 {
41296 if (
nPC10.CanBeChasedBy(
this))
41297 {
41299 if ((
flag69 & (
nPC10.Distance(
base.Center) < 400
f)) && (Collision.CanHitLine(
base.Center, 0, 0,
nPC10.Center, 0, 0) || Collision.CanHitLine(
base.Center, 0, 0,
nPC10.Top, 0, 0)))
41300 {
41301 this.ai[0] =
num66;
41302 }
41303 }
41304 }
41305 if (this.ai[0] >= 0
f)
41306 {
41309 }
41310 }
41312 {
41314 }
41316 {
41318 }
41320 {
41322 }
41324 {
41327 {
41329 }
41330 }
41331 float num67 = 0.5f;
41333 {
41335 }
41337 {
41339 }
41340 this.ai[1]++;
41341 float num68 = this.ai[1] / 180
f * ((float)
Math.PI * 2
f);
41343 {
41344 if (Main.rand.Next(3) == 0)
41345 {
41346 Dust
dust207 = Main.dust[Dust.NewDust(
base.Center, 0, 0, 27, 0
f, -2
f)];
41348 Vector2
unitY12 = Vector2.UnitY;
41350 val4 =
default(Vector2);
41352 dust207.noGravity = true;
41354 dust207.scale =
num67;
41355 dust207.fadeIn = 0.5f;
41356 dust207.alpha = 200;
41357 }
41358 }
41359 }
41361 {
41363 }
41364 int num71 = (int)this.ai[0];
41366 {
41368 {
41371 {
41373 }
41375 }
41376 return;
41377 }
41379 {
41381 }
41383 {
41385 }
41386 if (this.ai[0] >= 0
f)
41387 {
41390 }
41391 }
41393 {
41395 }
41397 {
41399 }
41401 {
41403 {
41405 {
41407 }
41409 {
41411 {
41415 val4 =
default(Vector2);
41417 Gore
gore7 = Gore.NewGoreDirect(
base.Center +
vector85 * 3
f,
vector85, Utils.SelectRandom<
int>(Main.rand, 1027, 1028, 1029, 1030));
41418 if (
gore7.velocity.Y > 0
f)
41419 {
41422 gore8.velocity *= -0.5f;
41423 }
41424 if (
gore7.velocity.Y < -5
f)
41425 {
41426 gore7.velocity.Y *= 0.8f;
41427 }
41428 gore7.velocity.Y *= 1.1f;
41429 gore7.velocity.X *= 0.88f;
41430 }
41431 }
41432 if (!Main.dedServ)
41433 {
41434 if (!
Filters.
Scene[
"CrystalDestructionVortex"].IsActive())
41435 {
41437 val4 =
default(Vector2);
41438 scene.Activate(
"CrystalDestructionVortex",
val4);
41439 }
41440 if (!
Filters.
Scene[
"CrystalDestructionColor"].IsActive())
41441 {
41443 val4 =
default(Vector2);
41444 scene2.Activate(
"CrystalDestructionColor",
val4);
41445 }
41448 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(
num74 * 2
f).UseProgress(0
f)
41449 .UseTargetPosition(
base.Center);
41450 }
41452 {
41455 }
41456 }
41458 {
41459 if (!Main.dedServ)
41460 {
41463 velocity.Y =
num76 * -0.25f;
41464 if (!
Filters.
Scene[
"CrystalDestructionVortex"].IsActive())
41465 {
41467 val4 =
default(Vector2);
41468 scene3.Activate(
"CrystalDestructionVortex",
val4);
41469 }
41470 if (!
Filters.
Scene[
"CrystalDestructionColor"].IsActive())
41471 {
41473 val4 =
default(Vector2);
41474 scene4.Activate(
"CrystalDestructionColor",
val4);
41475 }
41478 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(
num76 * 2
f).UseProgress(0
f)
41479 .UseTargetPosition(
base.Center);
41480 }
41482 {
41485 }
41486 }
41488 {
41490 if (Main.netMode != 2)
41491 {
41492 Filters.
Scene[
"CrystalDestructionVortex"].GetShader().UseIntensity(2
f).UseProgress(
num77 * 30
f);
41493 }
41496 {
41499 }
41500 }
41502 {
41503 if (!Main.dedServ)
41504 {
41507 }
41509 }
41511 {
41512 Vector2
vector86 =
default(Vector2);
41514 {
41515 if (Main.rand.Next(2) == 0)
41516 {
41519 vector86.X += (float)
Math.Sin((
double)((base.position.Y +
num79) * 0.01
f) + 6.2831854820251465 * ((double)Main.rand.Next(3) / 3.0)) * 0.5
f;
41523 vector86.Y +=
num79;
41525 Dust
dust208 = Dust.NewDustPerfect(
vector87, 27, Vector2.Zero, 0, Color.White * 0.1f, 1.1f);
41526 dust208.velocity.Y = Main.rand.NextFloat() * 2
f;
41527 dust208.fadeIn = 0.1f;
41528 }
41529 }
41530 }
41532 }
41534 {
41536 {
41537 if (this.ai[0] == 70
f)
41538 {
41540 }
41541 this.ai[0]++;
41543 if (this.ai[0] < 20
f)
41544 {
41546 }
41547 else if (this.ai[0] < 60
f)
41548 {
41550 }
41551 else if (this.ai[0] < 80
f)
41552 {
41554 }
41555 else
41556 {
41558 }
41562 }
41564 {
41565 return;
41566 }
41567 if (this.ai[0] == 0
f)
41568 {
41570 }
41571 this.ai[0]++;
41572 if (!(this.ai[0] >= 40
f))
41573 {
41574 return;
41575 }
41577 {
41580 {
41584 {
41586 }
41588 {
41591 nPC20.life +=
num82;
41593 nPC11.netUpdate = true;
41594 }
41595 }
41596 }
41598 }
41600 {
41602 }
41604 {
41606 }
41608 {
41610 }
41612 {
41614 }
41616 {
41618 }
41620 {
41622 }
41624 {
41626 }
41628 {
41630 }
41632 {
41634 }
41636 {
41638 }
41640 {
41642 }
41644 {
41646 }
41648 {
41650 }
41652 {
41654 }
41656 {
41658 }
41660 {
41662 }
41664 {
41666 }
41668 {
41670 }
41672 {
41674 }
41676 {
41678 }
41680 {
41682 }
41684 {
41686 }
41688 {
41690 }
41692 {
41694 }
41696 {
41698 }
41700 {
41702 }
41704 {
41706 }
41708 {
41710 }
41712 {
41714 }
41716 {
41718 }
41720 {
41722 }
41724 {
41726 }
41728 {
41730 }
41732 {
41734 }
41736 {
41738 }
41740 {
41742 }
41744 {
41746 }
41748 {
41750 }
41752 {
41754 }
41756 {
41758 }
41760 {
41762 }
41764 {
41766 }
41768 {
41770 }
41772 {
41774 }
41776 {
41778 }
41780 {
41782 }
41784 {
41786 }
41788 {
41790 }
41792 {
41794 }
41796 {
41798 }
41800 {
41802 }
41804 {
41806 }
41808 {
41810 }
41812 {
41814 }
41816 {
41818 }
41820 {
41822 }
41824 {
41826 }
41828 {
41830 }
41832 {
41834 }
41836 {
41838 }
41840 {
41842 }
41844 {
41846 }
41847 }
static ? ActiveSound GetActiveSound(SlotId slotId)
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
bool wet
The Entity is currently in water. Projectile: Affects movement speed and some projectiles die when ...
Vector2 DirectionFrom(Vector2 Source)
float AngleTo(Vector2 Destination)
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
float Distance(Vector2 Other)
Vector2 position
The position of this Entity in world coordinates.
int width
The width of this Entity's hitbox, in pixels.
Vector2 DirectionTo(Vector2 Destination)
bool active
If true, the Entity actually exists within the game world. Within the specific entity array,...
int height
The height of this Entity's hitbox, in pixels.
static void BroadcastParticleSpawn(ParticleOrchestraType type, ParticleOrchestraSettings settings)
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
static Color GetPortalColor(int colorIndex)
static void SyncPortalSections(Vector2 portalPosition, int fluff)
static bool SupportedTilesAreFine(Vector2 portalCenter, float portalAngle)
static FilterManager Scene
static ArmorShaderDataSet Armor
static bool[] CountsAsCritter
If true for a given NPC type (F:Terraria.NPC.type), then that NPC is counted as a critter....
static readonly SoundStyle Item1
static readonly SoundStyle DD2_DefeatScene
static readonly SoundStyle Item9
static readonly SoundStyle GlommerBounce
static readonly SoundStyle Item22
static readonly SoundStyle DD2_SkeletonSummoned
static readonly SoundStyle Item60
static readonly SoundStyle Item74
static readonly SoundStyle Item17
static readonly SoundStyle Item14
static readonly SoundStyle DD2_DarkMageHealImpact
static readonly SoundStyle Item8
static readonly SoundStyle Item28
static readonly SoundStyle Item113
static readonly SoundStyle Item120
static readonly SoundStyle Item82
static readonly SoundStyle Item121
static readonly SoundStyle Item26
static readonly SoundStyle Item101
static readonly SoundStyle Item46
static readonly SoundStyle Item117
static readonly SoundStyle Item123
static readonly SoundStyle Item7
static readonly SoundStyle Item34
static readonly SoundStyle Item20
static readonly SoundStyle Item13
static bool[] CommonSapling
static readonly ushort Count
void AI_155_MysticSnakeCoil()
void AI_193_Flamethrower()
void AI_159_PaperAirplanes()
void AI_173_HallowBossRainbowTrail()
int maxPenetrate
How many npc can this projectile hit before dying. (Or tile bounces) Automatically set at the end o...
void AI_148_StarSpawner()
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
void AI_067_FreakingPirates()
void AI_164_StormTigerGem()
void AI_186_PrincessWeapon()
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla projectile AI styles are enumerated in t...
int damage
This will always be set in Projectile.NewProjectile based on the weapons damage and player stat modif...
void DoRainbowCrystalStaffExplosion()
void AI_140_MonkStaffT1()
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
bool hide
Projectile is not drawn normally. Held projectiles (F:Terraria.Player.heldProj) and projectiles speci...
void AI_007_GrapplingHooks()
int identity
The projectile's universal unique identifier, which is the same on all clients and the server....
bool netUpdate
Set manually to true in M:Terraria.ModLoader.ModProjectile.AI once to make it sync its current F:Terr...
int penetrate
The remaining number of npc can this projectile hit before dying. (Or tile bounces)....
void AI_177_IceWhipSlicer()
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
void AI_180_FairyQueenSunDance()
void AI_161_RapierStabs()
IEntitySource GetProjectileSource_FromThis()
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int FindTargetWithLineOfSight(float maxRange=800f)
Finds the closest NPC to this projectile which can be targeted and which it has line of sight to.
bool ignoreWater
The projectile will not be affected by water. Defaults to false.
void AI_009_MagicMissiles()
void AI_145_BookStaffStorm()
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
Vector2[] oldPos
Holds the value of F:Terraria.Entity.position from previous updates from newest to oldest....
float knockBack
This will always be set in Projectile.NewProjectile based on the weapons knockback and player stat mo...
void AI_179_FairyQueenLance()
void AI_176_EdgyLightning()
bool friendly
If True, this projectile will hurt enemies (!F:Terraria.NPC.friendly) Defaults to false.
void AI_142_MonkStaffT2And3()
void AI_192_JuminoAnimation()
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
bool tileCollide
If true, the projectile will collide with tiles, usually bouncing or killing the tile depending on M:...
void AI_182_FinalFractal()
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
float light
Set to a value above 0f to make this projectile emit a white light (higher number: more intensive lig...
void AI_120_StardustGuardian()
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int extraUpdates
Additional update steps per tick. Useful for really fast projectiles such as Shadowbeam Staff....
void AI_184_BadTorchLuck()
void AI_047_MagnetSphere()
void AI_168_FirstFractal()
bool hostile
If True, this projectile will hurt players and friendly NPCs (F:Terraria.NPC.friendly) Defaults to ...
void AI_191_TrueNightsEdge()
void AI_066_TryInterceptingTarget(Vector2 targetDir, Vector2 targetVelocity, float speed)
void AI_137_LightningAura()
void AI_178_FireExplosion()
float GetLastPrismHue(float laserIndex, ref float laserLuminance, ref float laserAlphaMultiplier)
void AI_139_ExplosiveTrapExplosion()
void AI_141_MonkStaffT1Explosion()
void AI_181_FairyQueenRangedItemShot()
void AI_175_TitaniumStormShards()
void AI_061_FishingBobber()
void AI_170_FairyGlowstick()
void AI_172_HallowBossRainbowPelletStorm()
IEntitySource GetNPCSource_FromThis()
bool Colliding(Rectangle myRect, Rectangle targetRect)
void AI_183_ZoologistStrike()
void AI_131_FlameBurstShot()
float gfxOffY
An offset from the actual position of the projectile that will be added to the draw position....
void AI_121_StardustDragon()
void AI_130_FlameBurstTower()
void AI_147_Celeb2Rocket()
IEntitySource GetItemSource_FromThis()
void AI_194_HorsemanPumpkin()
void AI_143_MonkStaffT2Ghast()
NPC OwnerMinionAttackTargetNPC
void AI_174_MultisegmentPet()
void AI_138_ExplosiveTrap()
void AI_150_GolfClubHelper()
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....
void AI_167_SparkleGuitar()
void AI_136_BetsyBreath()
void AI_162_TigerPounce()
void AI_171_HallowBossRainbowStreak()
void AI_152_SuperStarSlash()
static int NewProjectile(IEntitySource spawnSource, Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner=-1, float ai0=0f, float ai1=0f, float ai2=0f)
This particular overload uses a Vector2 instead of X and Y to determine the actual spawn position and...
@ ChlorophyteLeafCrystalShot
This data type describes in detail how a sound should be played. Passable to the M:Terraria....